skillfed

textstat

Calculate statistical features from text

textstat v0.7.13 1.4M downloads/30d#3,983 on PyPI1,377
Permissive license MIT Active released

What it is and what it does

Textstat is a text analysis library that computes readability and complexity metrics using established linguistic formulas. It provides functions like Flesch Reading Ease, Flesch-Kincaid Grade Level, Gunning FOG, SMOG Index, Coleman-Liau Index, Dale-Chall Readability Score, and others—each returning a numerical score or grade level that estimates the difficulty of comprehending a given text.

The library supports multiple languages (en_US, de, es, fr, it, nl, pl, ru) with language-specific formula variants, and includes Spanish-specific readability tests. It depends on pyphen for hyphenation and nltk for linguistic processing. Most functions accept plain text and return a single metric; text_standard() synthesizes multiple formulas into a consensus grade estimate.

Use it for:

  • Evaluate readability of educational content, documentation, or web copy before publication.
  • Assess whether written material matches its intended audience's reading level.
  • Analyze text complexity in academic or publishing workflows to guide revision.
  • Compare readability across multiple documents or versions to track clarity improvements.
  • Generate readability reports for content management or accessibility compliance.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Textstat calculates readability and complexity metrics from text using multiple established formulas, returning grade-level estimates and readability scores.

Yes. Textstat is actively maintained, has no known vulnerabilities, installs with low friction, and offers a straightforward API for a well-defined task. It is suitable for anyone needing to measure text readability or grade level, whether for educational, editorial, or accessibility purposes. The MIT license removes licensing concerns.

Install

textstat on PyPI

pip

pip install textstat

uv

uv add textstat

poetry

poetry add textstat

Installing textstat

Before you install

Low friction install with three runtime dependencies (pyphen, nltk, setuptools). Active maintenance with recent release on 2026-02-18 and 1377 repository stars.

License in practice

MIT license permits unrestricted use, modification, and distribution with minimal obligations—suitable for commercial and proprietary projects.

Quickstart

pip install textstat

import textstat

text = "Playing games has always been thought to be important to the development of well-balanced and creative children."
print(textstat.flesch_reading_ease(text))
print(textstat.flesch_kincaid_grade(text))

nltk may require downloading language data on first use; see nltk documentation for setup if tokenization fails.

Verify before relying

  • Whether nltk requires additional data downloads (e.g., corpora) beyond the package install for full functionality.
  • Performance characteristics on very large texts or batch processing workloads.
  • Accuracy comparison between the multiple readability formulas for specific use cases.

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.6)
Install friction low — pure-Python wheel
Runtime dependencies 3 — pyphen, nltk, setuptools
Maintenance actively maintained — 177 days since the last release
Last repo commit
First released
Downloads 1,378,074/month — #3,983 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: textstat-0.7.13-py3-none-any.whl

Intended Audience :: DevelopersIntended Audience :: EducationIntended Audience :: Science/ResearchProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.9Topic :: Text Processing

Tags

readability scoringtext complexity analysisgrade level estimationflesch kincaid readabilitytext statistics calculationreading difficulty metricsgunning fog index
text-analysisreadability-metricsnlp

More Text Processing packages

Further reading