Sentence Counter

This sentence counter tool will count the number of sentences in your text. Just paste the text below and press the button, and you’ll be given the number of sentences. For a tool to do this is a little trickier than one may think. We can’t just count the periods (full stop), question marks and exclamations, because abbreviations have dots as well, and we have to ignore those. If you want to count words, we have a tool for that too!

What is a sentence?

A sentence the most basic is a subject (what or who the sentence is about), and the predicate (words about the subject).

This may be a simple as a subject-verb sentence (John ran), or a complex sentence with multiple subjects, predicates, and the addition of adverbs and adjectives. For example, The grey cat and the blue dog quickly ran and then stopped to eat.

How many Sentences in a Paragraph?

There are not set several sentences for a paragraph. Generally, writers tend to aim between 3 and 5 sentences. Short paragraphs tend to work better than very long ones. This is because the reader can focus on a short general subtopic at one time. There is a guide that goes into this in some detail.

How to make a sentence counter in code

For anyone interested in the programming side of the application or if you need to use a sentence counter method in your own app, here’s how I did it. The first thing was to isolate all the abbreviations.

I did to Loop through each word, and if the word matched a common abbreviation, I changed the period to another character. Then I split the text using a regular expression, either a period exclamation mark or a question mark. The length of the array was the number of sentences. The last thing was to return the abbreviations to their Original state in the text.

I hope you find the sentence counter useful!