The number is a contrast ratio: how far a text color sits from the color behind it, on a scale from 1:1 to 21:1. Identical colors give 1:1. Black on white gives 21:1.
Level AA asks for 4.5:1 on normal text, and 3:1 on text at 24px or larger and on interface parts like buttons and inputs. Level AAA asks for 7:1 and no regulation requires it.
There is no partial credit. A color below its threshold is a failure whether it misses by two points or by 0.02, and the ones that miss by a hair are the ones nobody sees.
Contrast is one requirement among many in WCAG. This is a contrast report, not a certificate of compliance. It is the part of the standard that is arithmetic, which is why it is the part that can be settled exactly.