DEV Community

Sourav Mahapatra
Sourav Mahapatra

Posted on Originally published at beginthings.com AI-assisted

Readability scores explained: Flesch Reading Ease vs Flesch–Kincaid Grade (with the formulas and a worked example)

"Aim for a Flesch score of 60+." "Keep it at grade 8." You've probably heard both pieces of advice, sometimes in the same style guide, without anyone explaining where the numbers come from. They come from two formulas that are older than personal computers, use exactly the same inputs, and point in opposite directions.

This post walks through both formulas, computes them by hand on two short texts, shows a minimal JavaScript implementation, and covers the edge cases that make different tools disagree.

The two formulas

Both use just three counts from your text: words, sentences and syllables. From those they derive two ratios:

  • ASL, average sentence length = words ÷ sentences
  • ASW, average syllables per word = syllables ÷ words

Flesch Reading Ease (FRE), Rudolf Flesch, 1948:

FRE = 206.835 − 1.015 × ASL − 84.6 × ASW
Enter fullscreen mode Exit fullscreen mode

Higher is easier. Long sentences and long words both pull the score down. Typical everyday prose lands somewhere between 50 and 80.

Flesch–Kincaid Grade Level (FKGL), J. Peter Kincaid and colleagues, 1975, developed for the US Navy:

FKGL = 0.39 × ASL + 11.8 × ASW − 15.59
Enter fullscreen mode Exit fullscreen mode

Higher is harder. The result maps roughly to a US school grade: 8.0 means a typical eighth-grader (age 13–14) should follow it.

Same inputs, different weights, opposite direction. That's why one guide says "go up" and another says "go down", and they're asking for the same thing.

Worked example 1: plain instructions

Send the invoice today. Ask the client to pay within seven days. Keep a copy for your records.

Counts: 18 words, 3 sentences, 24 syllables (using a typical heuristic counter, more on that below).

  • ASL = 18 ÷ 3 = 6.0
  • ASW = 24 ÷ 18 ≈ 1.333
  • FRE = 206.835 − 1.015 × 6.0 − 84.6 × 1.333 ≈ 87.9
  • FKGL = 0.39 × 6.0 + 11.8 × 1.333 − 15.59 ≈ 2.5

Very easy, roughly second-to-third-grade level. Exactly what you want for an instruction someone reads on their phone.

Worked example 2: the same idea in legalese

Remittance of the outstanding consideration should be effectuated within seven calendar days of receipt, notwithstanding any intervening administrative circumstances.

Counts: 19 words, 1 sentence, 47 syllables.

  • ASL = 19 ÷ 1 = 19.0
  • ASW = 47 ÷ 19 ≈ 2.474
  • FRE = 206.835 − 19.285 − 209.27 ≈ −21.7
  • FKGL = 7.41 + 29.19 − 15.59 ≈ 21.0

Yes, negative. Flesch Reading Ease isn't capped at 0 to 100. That range is where most real text falls, but nothing in the formula enforces it. A grade of 21 means "beyond postgraduate". Both numbers are telling you the same thing: split the sentence and use shorter words.

A minimal implementation

function countSyllables(word) {
  word = word.toLowerCase().replace(/[^a-z]/g, '');
  if (word.length <= 3) return 1;
  word = word.replace(/(?:[^laeiouy]es|ed|[^laeiouy]e)$/, ''); // silent endings
  word = word.replace(/^y/, '');
  const groups = word.match(/[aeiouy]{1,2}/g);
  return groups ? groups.length : 1;
}

function readability(text) {
  const sentences = text.match(/[^.!?]+[.!?]+/g) || [];
  const words = text.split(/\s+/).filter(Boolean);
  const syllables = words.reduce((n, w) => n + countSyllables(w), 0);
  if (!sentences.length || !words.length) return null;

  const asl = words.length / sentences.length;
  const asw = syllables / words.length;
  return {
    readingEase: +(206.835 - 1.015 * asl - 84.6 * asw).toFixed(1),
    gradeLevel: +(0.39 * asl + 11.8 * asw - 15.59).toFixed(1),
    words: words.length, sentences: sentences.length, syllables,
  };
}
Enter fullscreen mode Exit fullscreen mode

This takes about 20 lines, and it's also why no two readability tools agree exactly.

Why different tools give different scores

The formulas are fixed. The counting isn't.

  1. Syllables are guessed. English spelling doesn't map cleanly to sound, so almost every tool uses a heuristic like the one above. It counts "client" as one syllable (it's two) and "effectuated" as three (it's five). Dictionary-based counters do better on common words and worse on names and jargon. A difference of 0.1 in ASW moves FRE by about 8.5 points.
  2. Sentence detection varies. The regex above only counts text ending in ., ! or ?. A bullet list with no full stops can collapse into one giant "sentence" and tank the score. Some tools split on line breaks too, and abbreviations like "e.g." or "Dr." can add fake sentences.
  3. What counts as a word. Numbers, URLs, hyphenated words and emoji are handled differently everywhere.

Practical rule: compare scores from the same tool, before and after an edit. Don't compare your score in one tool with a target someone measured in another.

What the scores are good for, and what they're not

They're useful for:

  • Catching run-on sentences and jargon in help docs, onboarding emails, error messages and landing pages.
  • Tracking whether an edit made something simpler (same tool, before and after).
  • A rough check against a target audience. For general web writing, a common guideline is a reading-ease score of about 60–70 or higher, roughly grade 7–8.

They're not useful for:

  • Judging quality. "Dog cat sun run." scores as extremely easy and means nothing.
  • Very short text. One sentence is too small a sample. Paste at least a few paragraphs.
  • Code, lists and tables. Missing punctuation breaks sentence counting.
  • Non-English text. The constants were fitted to English. Other languages need their own adapted formulas.

Quick editing moves that actually move the numbers

  • Split sentences longer than about 25 words. ASL has the biggest lever in FKGL.
  • Swap the long word for the short one when the meaning is the same: "use" for "utilise", "help" for "facilitate", "pay" for "remit".
  • Turn inline lists into bullets with full stops, if you'll measure them.
  • Re-check, but don't chase a number. Once you're in range, clarity beats shaving off another point.

Try it without writing code

If you just want the two numbers for a draft, I built a free calculator that runs these two formulas in your browser. Paste text and it shows Flesch Reading Ease, Flesch–Kincaid Grade and the word, sentence and syllable counts behind them, with no signup and nothing uploaded. Readability score calculator on BeginThings. Disclosure: BeginThings is my project. It deliberately does just these two formulas, so it's handy for before-and-after comparisons.

What readability target does your team use for docs, and did you ever find it actually helped? Tell me in the comments.

This article was drafted with AI assistance; the formulas, counts and code were checked by hand and against the calculator's source before publishing.

Top comments (0)