Count sentences in text

Paste any text and get the sentence count. The tokenizer is the regex [^.!?]+[.!?]+: any run of non-terminator characters followed by one or more terminators counts as a sentence. The transform runs in your browser; nothing uploads. For a richer breakdown, see text statistics or readability score.

Input
Line 1:1 LF cloud_done Saved locally
Result Sentence Counter
0 lines 0 chars

Sentence counting via the standard terminator regex

A sentence is one match of the regex [^.!?]+[.!?]+. The pattern reads: a non-empty run of characters that are not ., !, or ?, followed by one or more such terminators. "Hello! How are you?" matches twice. "Hello" with no terminator matches zero times. "What?!" matches once because the consecutive ?! collapse into a single terminator group.

This is the same approach used by many word-processor sentence counts, and it is simple, fast, and predictable. It is not perfect: "Mr. Smith went home." tokenizes as two sentences because the period after Mr looks like a terminator. For text where abbreviations matter, treat the count as a lower-bound estimate.

For a fuller breakdown that pairs sentence count with words and paragraphs, jump to text statistics. For sentence-level reading difficulty, see readability score.

How to use count sentences in text

  1. 1Paste or type your text into the input panel on the left.
  2. 2The sentence count appears in the output panel as you type.
  3. 3Click Copy in the output header to copy the count.
  4. 4Click Download to save the result as a plain-text file.
  5. 5Run text statistics alongside if you want word and paragraph counts in one report.

Keyboard shortcuts

Drive TextResult without touching the mouse.

Shortcut Action
Ctrl FOpen the find & replace panel inside the input Plus
Ctrl ZUndo the last input change
Ctrl Shift ZRedo
Ctrl Shift EnterToggle fullscreen focus on the editor Plus
EscClose find & replace, or exit fullscreen
Ctrl KOpen the command palette to jump to any tool Plus
Ctrl SSave current workflow draft Plus
Ctrl PRun a saved workflow Plus

What this tool actually does

Tokenizes on ., !, and ?

The regex [^.!?]+[.!?]+ matches any non-empty run of non-terminator characters followed by one or more terminators. The match length is the number of sentences.

Consecutive terminators collapse

!!!, ?!, and ... count as a single sentence-ending group, because the regex greedily eats every consecutive terminator. "Wait! Stop!" = 2 sentences, "Wait!! Stop!" = 2 sentences, "Wait!!!" = 1 sentence.

Final fragment without a terminator does not count

A trailing run of words with no ./!/? at the end is ignored. "Hello world" = 0 sentences. Add a period and the count rises to 1. This is intentional: the regex requires a terminator.

Abbreviations can inflate the count

A period after Mr, Dr, e.g, or a numbered list (1. apples) is treated as a sentence end. If you need stricter sentence detection, paste a copy with abbreviations spelled out, or rely on word/paragraph counts instead.

Runs entirely in your browser

No upload, no logging, no server round-trip. The count fires on every keystroke and updates the output panel immediately.

Worked example

Four terminator runs (!, ?, ., .) produce four matches. Replace How are you today? with How are you today?! and the count stays 4 (the consecutive terminators collapse).

Input
Hello, world! How are you today? I am fine. Really.
Output
Sentences: 4

Settings reference

Pattern How it counts
Hello. 1 sentence (one terminator).
Hello! How are you? 2 sentences (two terminator runs).
Wait!!! 1 sentence (consecutive terminators collapse).
Mr. Smith left. 2 sentences (the abbreviation period counts as a terminator).
Hello world 0 sentences (no terminator).
Empty input 0 sentences.

FAQ

How does it detect a sentence?
It runs the regex [^.!?]+[.!?]+ against the input. Each match is one sentence. The terminators are full stop, exclamation, and question mark.
Does Mr. Smith count as two sentences?
Yes. The regex treats every . as a terminator. If your text has many abbreviations, the reported count will be higher than what a human reader would say. Treat it as a lower-bound estimate for that style of text.
What about ... or ?!?
They count as a single sentence end. The regex consumes the whole run of terminators in one match.
Does a trailing fragment count?
No. "Hello world" with no ., !, or ? reports 0 sentences. Add a terminator and the count rises.
Where can I get more detail than just a count?
Use text statistics for words, sentences, paragraphs, and lines in one report, or readability score for sentence-level Flesch-Kincaid.