The scale and thresholds
WCAG sets level AA at 4.5:1 for normal text and 3:1 for large text, and level AAA at 7:1 and 4.5:1. Black on white is 21:1, the maximum. Mid-grey #777777 on white is 4.48:1, a narrow miss for normal text.
How it is calculated
Each colour is converted to relative luminance, then the ratio is (lighter + 0.05) divided by (darker + 0.05). The Contrast Checker uses the exact WCAG formula.
What it does not cover
Contrast is one factor. Thin fonts, small sizes, text over images and gradients need their own checks. Read how to check contrast for WCAG for examples.
Common misunderstanding
Passing the ratio does not guarantee a design is accessible to everyone, and a failing pair is not always unreadable. It is a tested minimum, not a full assessment.