# Text Statistics Calculator

> Counts characters (with and without spaces), words, unique words, sentences and paragraphs of a text, computes average word and sentence length, the most frequent words and the longest word, and estimates silent reading time at 238 words per minute (Brysbaert 2019) and speaking time at 150 words per minute.

- Calculator id: `text-statistics` · Category: Everyday Life (`everyday`) · Tool name: `analyze_text_statistics`
- Canonical page: https://tttkmbb.com/everyday/text-statistics · This document: https://tttkmbb.com/everyday/text-statistics.md · JSON definition: https://tttkmbb.com/everyday/text-statistics.json

## Purpose

Counts characters (with and without spaces), words, unique words, sentences and paragraphs of a text, computes average word and sentence length, the most frequent words and the longest word, and estimates silent reading time at 238 words per minute (Brysbaert 2019) and speaking time at 150 words per minute.

**Use when:** You need a word or character count, word frequencies, or the reading and speaking time of a passage, essay, speech or post, for example to check a length limit.

**Do not use when:** You need readability grades (use reading-level), reading time from a word count you already have (use reading-time), or typing speed (use typing-speed).

## Input

| Parameter | Type | Unit | Required | Description |
| --- | --- | --- | --- | --- |
| `text` | string |  | required | The text to analyse, up to 20,000 characters. |
| `reading_speed_wpm` | number | wpm | optional, default 238 | Silent reading speed in words per minute; 238 wpm is the adult mean for non-fiction (Brysbaert 2019). (min 50, max 2000) |
| `speaking_speed_wpm` | number | wpm | optional, default 150 | Speaking pace in words per minute; 150 wpm is a typical presentation or audiobook pace. (min 50, max 500) |

## Output

| Field | Type | Unit | Description |
| --- | --- | --- | --- |
| `characters` | integer |  | All characters including spaces and line breaks (Unicode code points). |
| `characters_without_spaces` | integer |  | Characters excluding all whitespace. |
| `words` | integer |  | Whitespace-separated tokens that contain at least one letter or digit. |
| `unique_words` | integer |  | Distinct words, case-insensitive, ignoring surrounding punctuation. |
| `sentences` | integer |  | Segments ending in . ! or ? (optionally followed by a closing quote or bracket) before whitespace or the end of the text (minimum 1). |
| `paragraphs` | integer |  | Blocks of text separated by blank lines (minimum 1). |
| `average_word_length` | number | characters | Letters and digits of all words ÷ words (punctuation, apostrophes and hyphens are not counted). |
| `average_sentence_length_words` | number | words | words / sentences. |
| `unique_word_ratio_percent` | number | % | unique_words / words × 100 (lexical variety). |
| `reading_time_seconds` | number | s | words / reading_speed_wpm × 60. |
| `reading_time_text` | string |  | Reading time as h / min / s. |
| `speaking_time_seconds` | number | s | words / speaking_speed_wpm × 60. |
| `speaking_time_text` | string |  | Speaking time as h / min / s. |
| `longest_word` | string |  | First word with the most letters and digits. |
| `top_words` | list |  | Up to 10 rows of word and count for words of 3 or more characters, most frequent first (ties in order of first appearance). |

## Formula

`words = whitespace tokens containing a letter or digit; sentences = max(1, segments split at [.!?]+ followed by whitespace or end); paragraphs = max(1, blocks split at blank lines); average_word_length = Σ letters and digits per word / words; reading_time_seconds = words / reading_speed_wpm × 60; speaking_time_seconds = words / speaking_speed_wpm × 60`

Counting follows common word-processor conventions: hyphenated words and numbers count as one word, and abbreviations with periods ('e.g. ') end a sentence. Reading speed defaults to Brysbaert's 2019 meta-analytic mean for silent reading of English non-fiction (238 wpm; fiction 260 wpm).

## Data Sources

- Brysbaert M (2019) How many words do we read per minute? A review and meta-analysis of reading rate, J Mem Lang 109:104047 — https://doi.org/10.1016/j.jml.2019.104047 (peer_reviewed, retrieved 2026-09-24)
- Words per minute – reading and speech rates (Wikipedia) — https://en.wikipedia.org/wiki/Words_per_minute (reference, retrieved 2026-09-24)

Data freshness: `static`. Deterministic formula with fixed constants; results never go stale. Inputs supplied by the caller determine the output.

## API

- `GET https://tttkmbb.com/api/v1/calculate/text-statistics?text=…`
- `POST https://tttkmbb.com/api/v1/calculate/text-statistics` with JSON body `{"inputs": {…}}`
- Response: unified envelope (`success`, `request`, `result.values`, `result.units`, `sources`, `freshness`, `timestamp`, `next_actions`, `links`); see https://tttkmbb.com/docs/response-format.md
- Schema: https://tttkmbb.com/api/v1/calculators/text-statistics · OpenAPI operationId `analyze_text_statistics` in https://tttkmbb.com/openapi.json
- Authentication: none. Rate limit: fair use, see https://tttkmbb.com/docs/rate-limits.md.

## MCP

- Server: `https://tttkmbb.com/mcp` (Streamable HTTP, JSON-RPC 2.0, no auth)
- Tool:  `run_calculator` with `{"calculator_id": "text-statistics", "inputs": {…}}`

## Example

- Pangram plus a second sentence: inputs `{"text":"The quick brown fox jumps over the lazy dog. It was a sunny day!"}` → `{"characters":64,"characters_without_spaces":51,"words":14,"unique_words":13,"sentences":2,"paragraphs":1,"average_word_length":3.5,"average_sentence_length_words":7,"reading_time_seconds":3.5,"speaking_time_seconds":5.6,"longest_word":"quick"}`
- Two paragraphs with repeated words: inputs `{"text":"Rain, rain, go away. Come again another day.\n\nLittle Johnny wants to play; rain, rain, go away!","reading_speed_wpm":238,"speaking_speed_wpm":150}` → `{"characters":95,"characters_without_spaces":78,"words":17,"unique_words":12,"sentences":3,"paragraphs":2,"average_word_length":4.12,"reading_time_seconds":4.3,"speaking_time_seconds":6.8,"longest_word":"another","top_words":[{"word":"rain","count":4},{"word":"away","count":2},{"word":"come","count":1},{"word":"again","count":1},{"word":"another","count":1},{"word":"day","count":1},{"word":"little","count":1},{"word":"johnny","count":1},{"word":"wants","count":1},{"word":"play","count":1}]}`

```
GET https://tttkmbb.com/api/v1/calculate/text-statistics?text=The+quick+brown+fox+jumps+over+the+lazy+dog.+It+was+a+sunny+day%21
```

## Limitations

You need readability grades (use reading-level), reading time from a word count you already have (use reading-time), or typing speed (use typing-speed). Counting follows common word-processor conventions: hyphenated words and numbers count as one word, and abbreviations with periods ('e.g. ') end a sentence. Reading speed defaults to Brysbaert's 2019 meta-analytic mean for silent reading of English non-fiction (238 wpm; fiction 260 wpm). All values are computed from the formula above; no measurement or live data is involved.

## FAQ

**Why does the word count differ from my word processor?**

Tools differ on hyphens, slashes, numbers and stand-alone punctuation. Here any whitespace-separated token with a letter or digit is one word, which matches Microsoft Word for ordinary prose.

**How are sentences detected?**

A sentence ends at . ! or ? followed by a space or the end of the text, so abbreviations such as 'Dr. ' add a sentence; a text without terminal punctuation counts as one sentence.

**What speaking speed should I use?**

Conversational English runs 150–160 wpm; slow, formal presentations 100–130 wpm; auctioneers and fast speakers exceed 200 wpm. Audiobooks are recorded near 150 wpm.

## Related

- [Reading Time Calculator](https://tttkmbb.com/everyday/reading-time.md) — Reading time from a word count alone.
- [Reading Level Calculator](https://tttkmbb.com/everyday/reading-level.md) — Readability grades for the same text.
- [Typing Speed Calculator](https://tttkmbb.com/everyday/typing-speed.md) — Words per minute for typing.
