Text Statistics
Analyze text and get detailed statistics including readability scores
Text Statistics
Analyze text and get detailed statistics including readability scores
About Text Statistics Analyzer
Comprehensive text analysis tool that provides detailed statistics about your content including readability scores, word frequency analysis, sentence structure, and SEO metrics. Perfect for writers, content creators, and SEO professionals.
- Readability analysis (Flesch-Kincaid, Coleman-Liau, ARI)
- Word frequency and lexical diversity metrics
- Sentence and paragraph structure analysis
- Reading time estimates for different audiences
- SEO content optimization insights
How to Use Text Statistics Analyzer
- Input Text - Paste or type your content for analysis
- Get Statistics - View comprehensive text metrics automatically
- Review Readability - Check Flesch-Kincaid and other readability scores
- Analyze SEO - Review keyword density and content optimization
- Export Report - Download detailed analysis report
Advertisement
Frequently Asked Questions
What is readability score?
Readability scores measure how easy text is to read and understand. The Flesch-Kincaid Grade Level indicates the U.S. school grade needed to comprehend the text, while the Flesch Reading Ease score ranges from 0-100 (higher = easier to read).
How is keyword density calculated?
Keyword density is calculated as (number of keyword occurrences / total word count) × 100. For SEO, a keyword density of 1-3% is generally recommended to avoid over-optimization while maintaining relevance.
What is lexical diversity?
Lexical diversity measures vocabulary richness by calculating the ratio of unique words to total words. Higher lexical diversity indicates more varied vocabulary and typically better writing quality.
How are reading time estimates calculated?
Reading time is estimated based on average reading speeds: adults read 225-250 words per minute, while students read slower (elementary: 100 wpm, high school: 200 wpm). Speaking pace is typically 150 wpm.
What makes good content according to text statistics?
Good content typically has: 8th-10th grade reading level for general audiences, 15-20 words per sentence, varied sentence lengths, 1-3% keyword density, and high lexical diversity (60-80% unique words).
Readability Scores Guide
| Score Range | Reading Level | Education Level | Content Type |
|---|---|---|---|
| 90-100 | Very Easy | 5th Grade | Comics, children's books |
| 80-89 | Easy | 6th Grade | Popular magazines |
| 70-79 | Fairly Easy | 7th Grade | Reader's Digest |
| 60-69 | Standard | 8th-9th Grade | Plain English, web content |
| 50-59 | Fairly Difficult | 10th-12th Grade | Time magazine |
| 30-49 | Difficult | College Level | Academic papers |
| 0-29 | Very Difficult | Graduate Level | Scientific journals |
Sponsored Content
Common Use Cases
Content Creation:
- Blog post optimization
- SEO content analysis
- Social media post metrics
- Email marketing content
- Website copy evaluation
- Product description analysis
- Meta description optimization
- Headline effectiveness testing
Academic & Professional:
- Academic paper analysis
- Research document review
- Technical writing assessment
- Grant proposal evaluation
- Legal document analysis
- Corporate communications
- Training material development
- Educational content creation
SEO Content Guidelines
Optimal Content Metrics:
Readability:
- • Target Grade Level: 8th-10th grade
- • Flesch Reading Ease: 60-70
- • Average Sentence Length: 15-20 words
- • Paragraph Length: 2-4 sentences
- • Use of transition words: 20-30%
SEO Optimization:
- • Keyword Density: 1-3%
- • Content Length: 300+ words
- • Unique Words: 60-80%
- • Subheadings: Every 100-200 words
- • Internal Links: 2-3 per 1000 words
Programming Examples
JavaScript Text Analysis:
class TextStatistics {
constructor(text) {
this.text = text;
this.words = text.trim().split(/\s+/);
this.sentences = text.split(/[.!?]+/).filter(s => s.trim());
this.paragraphs = text.split(/\n\s*\n/).filter(p => p.trim());
}
getBasicStats() {
return {
characters: this.text.length,
charactersNoSpaces: this.text.replace(/\s/g, '').length,
words: this.words.length,
sentences: this.sentences.length,
paragraphs: this.paragraphs.length
};
}
getReadabilityScores() {
const avgWordsPerSentence = this.words.length / this.sentences.length;
const avgSyllablesPerWord = this.getAverageSyllables();
// Flesch Reading Ease Score
const fleschScore = 206.835 - 1.015 * avgWordsPerSentence - 84.6 * avgSyllablesPerWord;
// Flesch-Kincaid Grade Level
const gradeLevel = 0.39 * avgWordsPerSentence + 11.8 * avgSyllablesPerWord - 15.59;
return {
fleschReadingEase: Math.max(0, Math.min(100, fleschScore)),
fleschKincaidGrade: Math.max(0, gradeLevel),
avgWordsPerSentence: avgWordsPerSentence,
avgSyllablesPerWord: avgSyllablesPerWord
};
}
getAverageSyllables() {
const syllableCount = this.words.reduce((total, word) => {
return total + this.countSyllables(word);
}, 0);
return syllableCount / this.words.length;
}
countSyllables(word) {
const vowels = word.match(/[aeiouy]+/gi);
let syllables = vowels ? vowels.length : 1;
if (word.endsWith('e')) syllables--;
return Math.max(1, syllables);
}
getLexicalDiversity() {
const uniqueWords = new Set(this.words.map(w => w.toLowerCase()));
return (uniqueWords.size / this.words.length) * 100;
}
getKeywordDensity(keyword) {
const keywordCount = this.words.filter(word =>
word.toLowerCase() === keyword.toLowerCase()
).length;
return (keywordCount / this.words.length) * 100;
}
}
// Example usage
const text = "This is sample text for analysis. It contains multiple sentences.";
const stats = new TextStatistics(text);
console.log("Basic Stats:", stats.getBasicStats());
console.log("Readability:", stats.getReadabilityScores());
console.log("Lexical Diversity:", stats.getLexicalDiversity().toFixed(2) + "%");
Python Implementation:
import re
from collections import Counter
class TextStatistics:
def __init__(self, text):
self.text = text
self.words = text.strip().split()
self.sentences = [s.strip() for s in re.split(r'[.!?]+', text) if s.strip()]
self.paragraphs = [p.strip() for p in text.split('\n\n') if p.strip()]
def get_basic_stats(self):
return {
'characters': len(self.text),
'characters_no_spaces': len(re.sub(r'\s', '', self.text)),
'words': len(self.words),
'sentences': len(self.sentences),
'paragraphs': len(self.paragraphs)
}
def get_readability_scores(self):
avg_words_per_sentence = len(self.words) / len(self.sentences) if self.sentences else 0
avg_syllables_per_word = self.get_average_syllables()
# Flesch Reading Ease Score
flesch_score = 206.835 - 1.015 * avg_words_per_sentence - 84.6 * avg_syllables_per_word
# Flesch-Kincaid Grade Level
grade_level = 0.39 * avg_words_per_sentence + 11.8 * avg_syllables_per_word - 15.59
return {
'flesch_reading_ease': max(0, min(100, flesch_score)),
'flesch_kincaid_grade': max(0, grade_level),
'avg_words_per_sentence': avg_words_per_sentence,
'avg_syllables_per_word': avg_syllables_per_word
}
def get_average_syllables(self):
total_syllables = sum(self.count_syllables(word) for word in self.words)
return total_syllables / len(self.words) if self.words else 0
def count_syllables(self, word):
vowels = re.findall(r'[aeiouy]+', word.lower())
syllables = len(vowels)
if word.lower().endswith('e'):
syllables -= 1
return max(1, syllables)
def get_lexical_diversity(self):
unique_words = set(word.lower() for word in self.words)
return (len(unique_words) / len(self.words)) * 100 if self.words else 0
def get_word_frequency(self, top_n=10):
word_freq = Counter(word.lower() for word in self.words)
return word_freq.most_common(top_n)
def get_keyword_density(self, keyword):
keyword_count = sum(1 for word in self.words if word.lower() == keyword.lower())
return (keyword_count / len(self.words)) * 100 if self.words else 0
# Example usage
text = "This is sample text for analysis. It contains multiple sentences and paragraphs."
stats = TextStatistics(text)
print("Basic Stats:", stats.get_basic_stats())
print("Readability:", stats.get_readability_scores())
print(f"Lexical Diversity: {stats.get_lexical_diversity():.2f}%")
print("Most Common Words:", stats.get_word_frequency(5))
Advertisement
