
Security News
CVE Volume Surges Past 48,000 in 2025 as WordPress Plugin Ecosystem Drives Growth
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.
spache-formula
Advanced tools
Formula to detect the grade level of text according to the (revised) Spache Readability Formula (1974)
Formula to detect the grade level of text according to the (revised) Spache readability formula.
This package exposes an algorithm to detect ease of reading of English texts.
You’re probably dealing with natural language, and know you need this, if you’re here!
This algorithm isn’t based on syllabbles compared to some other algorithms, which means it’s quicker to calculate.
See spache for a list of words which count as “known”.
This package is ESM only. In Node.js (version 14.14+, 16.0+), install with npm:
npm install spache-formula
In Deno with esm.sh:
import {spacheFormula} from 'https://esm.sh/spache-formula@2'
In browsers with esm.sh:
<script type="module">
import {spacheFormula} from 'https://esm.sh/spache-formula@2?bundle'
</script>
import {spacheFormula} from 'spache-formula'
spacheFormula({word: 30, sentence: 2, unfamiliarWord: 6}) // => 4.114
spacheFormula({word: 30, sentence: 2}) // => 2.474
spacheFormula() // => NaN
This package exports the identifier spacheFormula.
There is no default export.
spacheFormula(counts)Given the number of words (word), the number of sentences (sentence), and
the number of unique unfamiliar words (unfamiliarWord) in a document, returns
the grade level associated with the document.
countsCounts from input document.
counts.sentenceNumber of sentences (number, required).
counts.wordNumber of words (number, required).
counts.unfamiliarWordNumber of unfamiliar words (number, default: 0).
Grade level associated with the document (number).
This package is fully typed with TypeScript.
It exports the additional type Counts.
This package is at least compatible with all maintained versions of Node.js. As of now, that is Node.js 14.14+ and 16.0+. It also works in Deno and modern browsers.
automated-readability
— uses character count instead of error-prone syllable parsercoleman-liau
— uses letter count instead of an error-prone syllable parserdale-chall-formula
— uses a dictionary, suited for higher reading levelsflesch
— uses syllable countflesch-kincaid
— like flesch, returns U.S. grade levelsgunning-fog
— uses syllable count, needs POS-tagging and NERsmog-formula
— like gunning-fog, without the need for advanced NLP tasksYes please! See How to Contribute to Open Source.
This package is safe.
FAQs
Formula to detect the grade level of text according to the (revised) Spache Readability Formula (1974)
We found that spache-formula demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.

Security News
Socket CEO Feross Aboukhadijeh joins Insecure Agents to discuss CVE remediation and why supply chain attacks require a different security approach.

Security News
Tailwind Labs laid off 75% of its engineering team after revenue dropped 80%, as LLMs redirect traffic away from documentation where developers discover paid products.