What is Google Ngrams? 8 Ways to Track Word History and Cultural Trends
TL;DR
Google Books Ngram Viewer graphs how words appear across 500+ years of digitized books. Learn what n-grams are, how frequency is calculated, and how to use 8 search operators to analyze language data.
Table of Contents
Google Books Ngram Viewer is a free research search engine that graphs the historical frequency of words and phrases across millions of digitized books printed between 1500 and 2019 (with updated corpora extending through 2024). Launched in 2010 by Google and Harvard researchers, the tool allows you to measure how language, ideas, and cultural references change over centuries.
Instead of counting how many total books contain a word, the Ngram Viewer calculates the percentage of total words in a given year that match your search. If you search for terms like "nursery school", "kindergarten", or "child care", the platform plots the exact usage trajectories across American English, British English, French, German, Spanish, Russian, Hebrew, or Chinese literature.
Google Ngram Viewer: Core Facts
Covers 8 major languages across distinct dataset generations (2009, 2012, 2019, and quarterly releases).
Phrases must appear in at least 40 printed books to filter out OCR errors and maintain dataset stability.
Supports single words (1-grams) through complex 7-word phrases, wildcards (*), and grammatical tags.
1. What an N-Gram Is: From 1-Grams to 7-Grams
In computational linguistics, an n-gram is a contiguous sequence of n items from a given sample of text. In Google Ngrams, an item is a word or token.
- 1-gram (Unigram): A single word, such as
kindergarten,radio, oralgorithm. - 2-gram (Bigram): A two-word phrase, such as
child care,machine learning, ornursery school. - 3-gram (Trigram): A three-word sequence, such as
University of Oxfordorartificial neural network. - 4-gram to 7-gram: Longer multi-word phrases, such as
the United States of America. In the July 2024 update, Google expanded search support up to 7 words (previously capped at 5).
Tokenization splits punctuation and contractions based on language rules. In English, contractions split into separate tokens: they're becomes the bigram they 're, and don't normalizes to do not. This ensures consistent indexing across modern and historical texts.
2. How the Y-Axis Measures Normalized Frequency Percentage
A common point of confusion is what the numbers on the vertical axis represent. The Y-axis does not display raw book counts or raw word totals. It displays a normalized percentage frequency.
Because vastly more books were published in 2000 than in 1800, raw volume counts would create misleading spikes. By dividing the number of times your phrase appears by the total number of words scanned in that specific year, Google Books Ngram Viewer normalizes the data. If the phrase child care shows a frequency of 0.0008% in 1990, it means 8 out of every 1,000,000 bigrams printed in English in 1990 were child care.
3. Smoothing Controls: Raw Spikes vs Moving Averages
The Smoothing dropdown at the top of the viewer controls moving average calculations. Yearly publishing data can contain sharp annual spikes, particularly in earlier centuries when fewer books were printed.
- Smoothing = 0: Displays raw, unfiltered annual data. Every single year shows its exact percentage, revealing one-off historical spikes or sudden war-time publications.
- Smoothing = 3 (Default): Calculates a 7-year moving average window. For the year 1950, the viewer averages the values from 1947 through 1953 (3 years before, the target year, and 3 years after, divided by 7).
- Smoothing = 5 to 10: Averages 11 to 21 years of data, creating broad multi-decade curves that reveal long-term cultural and linguistic trends.
4. Wildcard Search (`*`) for Phrase Patterns
When you place an asterisk (*) in your query, Google Ngrams finds and plots the top 10 most common word substitutions that complete the phrase.
For example, querying University of * displays separate trend lines for University of California, University of Chicago, University of Michigan, University of Illinois, and University of Pennsylvania. You can also place wildcards inside phrases, such as president * Lincoln or cure for *.
5. Inflection Search (`_INF`) to Group Word Forms
Words frequently appear across multiple grammatical inflections, including past tense, gerunds, and plurals. Appending _INF to any word automatically aggregates all morphological variants.
| Query Syntax | Forms Included in Graph | Practical Use Case |
|---|---|---|
| book_INF a hotel | book a hotel, books a hotel, booked a hotel, booking a hotel | Measures total hospitality booking intent across tenses. |
| drive_INF a car | drive, drives, drove, driven, driving a car | Tracks automobile adoption across 20th-century literature. |
| write_INF a letter | write, writes, wrote, written, writing a letter | Measures epistolary writing trends from 1800 to present. |
Clicking on the resulting graph allows you to expand individual curves for each tense or view the combined sum. Only 1 _INF modifier is supported per individual query.
6. Part-of-Speech Tagging (`_NOUN`, `_VERB`, `_ADJ`, `_ADV`)
Many English words function as both nouns and verbs. Searching tackle without tags combines fishing gear (noun) with resolving problems or football maneuvers (verb). Appending Part-of-Speech (POS) tags isolates the exact syntactic category.
_NOUN: Isolates nouns (e.g.,water_NOUNvswater_VERB)_VERB: Isolates verbs (e.g.,run_VERBvsrun_NOUN)_ADJ: Isolates adjectives (e.g.,light_ADJvslight_NOUN)_ADV: Isolates adverbs (e.g.,well_ADVvswell_NOUN)_PRON,_DET,_ADP,_NUM,_CONJ,_PRT: Identifies pronouns, determiners, adpositions, numbers, conjunctions, and particles._START_and_END_: Matches sentence boundary positions (e.g., words that start or end sentences).
According to research by Lin et al. (ACL 2012), automatic POS tag accuracy in modern English books exceeds 95%. POS tagging is available in the 2012, 2019, and 2024 datasets (the 2009 dataset does not support syntactic tagging).
7. Ngram Arithmetic (+, -, /, *) to Track Cultural Shifts
Google Ngrams supports five mathematical operators that combine, subtract, or scale different terms in a single graph:
| Operator | Syntax Example | Function & Calculation |
|---|---|---|
| + (Sum) | (game + sport + play) | Sums the frequencies of multiple expressions into a single combined curve. |
| - (Difference) | (radio - television) | Subtracts right expression from left expression (use spaces around the minus sign). |
| / (Ratio) | women / men | Divides left term by right term, isolating relative proportion shifts over time. |
| * (Scale Multiplier) | (microscope * 100) | Multiplies low-frequency terms to display on the same scale as common words. |
| : (Corpus Selector) | football:eng_gb, football:eng_us | Plots the same word across different geographical corpora on a single chart. |
If your search term contains literal slashes or hyphens (such as the word and/or or well-meaning), enclose the phrase in square brackets like [and/or] to prevent the parser from executing division.
8. Corpora Datasets and the 40-Book Minimum Threshold
Google Ngrams offers access to several distinct literary corpora:
- English (eng): All digitized English books regardless of publication country.
- American English (eng_us): Books published specifically in the United States.
- British English (eng_gb): Books published specifically in Great Britain.
- English Fiction (eng_fiction): Books categorized as fiction by libraries and publishers.
- English One Million (eng_1m): A balanced sample of 1,000,000 English books from 1500 to 2008 with a maximum of 6,000 books per single year.
- International Corpora: French (fre), German (ger), Spanish (spa), Russian (rus), Italian (ita), Hebrew (heb), and Simplified Chinese (chi_sim).
To maintain dataset quality and prevent individual obscure typos or OCR anomalies from dominating results, Google enforces a 40-book minimum cutoff. If an n-gram appears in fewer than 40 separate books across the entire corpus, it is excluded from the index, returning a 0% flatline.
Frequently Asked Questions
Is Google Books Ngram Viewer free to use?
Yes. Google Books Ngram Viewer is completely free and publicly accessible at books.google.com/ngrams. You can search online, embed generated charts in articles, and download the full raw datasets for computational research.
Why do early years before 1800 show dramatic spikes?
Book publishing was relatively rare prior to the 19th century (only about 500,000 books in English were published before 1800). If a specific word appears in just one book in 1650 and zero books in 1649, that single appearance creates a sharp percentage spike in normalized frequency.
How do I search for case-insensitive phrases?
Check the "case-insensitive" checkbox next to the search bar. The Ngram Viewer will sum all capitalization variants (such as "internet", "Internet", and "INTERNET") into a single combined curve.
Can I download raw Google Ngram datasets for Python or R?
Yes. Google provides raw text files grouped by starting letters and n-gram sizes (1-grams through 5-grams) on their public datasets page. Researchers analyze these files directly using Python, pandas, and statistical software for large-scale culturomic analysis.
Was this article helpful?
Comments
Loading comments...