Skip to content

@technobuddha > library > String > Analysis

Function: readability()

ts
function readability(text: string): number;

Defined in: readability.ts:28

Calculates the Flesch-Kincaid readability score for a given text.

The Flesch-Kincaid readability score estimates how easy a text is to read, with higher scores indicating easier readability. The formula considers the average number of words per sentence and the average number of syllables per word.

ScoreSchool LevelNotes
100.00–90.005ᵗʰ gradeVery easy to read. Easily understood by an average 11-year-old student.
90.0–80.06ᵗʰ gradeEasy to read. Conversational English for consumers.
80.0–70.07ᵗʰ gradeFairly easy to read.
70.0–60.08ᵗʰ & 9ᵗʰ gradePlain English. Easily understood by 13-15 year-old students.
60.0–50.010ᵗʰ to 12ᵗʰ gradeFairly difficult to read.
50.0–30.0CollegeDifficult to read.
30.0–10.0College graduateVery difficult to read. Best understood by university graduates.
10.0–0.0ProfessionalExtremely difficult to read. Best understood by university graduates.

Parameters

ParameterTypeDescription
textstringThe input text to analyze.

Returns

number

The Flesch-Kincaid readability score as a number.

See

https://en.wikipedia.org/wiki/Flesch–Kincaid_readability_tests