Zipf’s Law Rank-Frequency (f_r = f₁ / r^s) & Generalized Harmonic Number Calculator

Predict rank-r frequency f_r = f₁ / r^s and cumulative corpus share across N items.

Predicted Frequency at Rank #10
10,000 occurrences
Generalized Harmonic Number H_{V,s} 7.486 H
Corpus Share of Rank #10 1.336 %
Estimated Total Corpus Occurrences 748,547.086 total
Inputs
⚡ Scenarios:
count
Frequency of the #1 top-ranked item (f₁).
rank r
Rank r of the item to evaluate (r ≥ 1).
s
Zipf characterization exponent s (classic linguistic Zipf law s ≈ 1.0).
items N
Total number of distinct ranked items N in the system.
Results & Graph
Predicted Frequency at Rank #10
10,000 occurrences
Generalized Harmonic Number H_{V,s}
7.486 H
Corpus Share of Rank #10
1.336 %
Estimated Total Corpus Occurrences
748,547.086 total

Predicted Frequency at Rank #10

Graph 1 • Zipf’s Law Rank-Frequency • Domain Architecture & Live Telemetry Maps Rank1 Top Frequency F1, Target Item Rank R, Zipf Exponent S through Zipf’s Law Rank-Frequency Formula.
Predicted Frequency at Rank #1: 10,000 occurrences Zipf’s Law Rank-Frequency • Invariants & Metrics Predicted Frequency at Rank 10,000 occurrences Generalized Harmonic Number 7.486 H Corpus Share of Rank #10 1.336 % Estimated Total Corpus Occur 748,547.086 total
Graph 2 • Predicted Frequency at Rank #10 Across Rank1 Top Frequency F1 Sweep (40% → 160%) Evaluates f(r) = f_1 / r^s; Probability(r) = (1 / r^s) / Σ_{k=1..N} (1 / k^s) across 7 operating points (current input highlighted).
0 occurr 8.8k occurr 17.6k occurr 4.0k 40.0kcount 6.0k 60.0kcount 8.0k 80.0kcount 10.0k 100.0kcount 12.0k 120.0kcount 14.0k 140.0kcount 16.0k 160.0kcount
Graph 3 • Joint Sensitivity: Rank1 Top Frequency F1 × Target Item Rank R Compares Predicted Frequency at Rank #10 when Target Item Rank R is shifted +25% (solid) vs. −25% (dashed).
0 occurr 8.9k occurr 17.9k occurr --- Target Item Rank R @ 75% 5.4k -30% 6.5k -15% 7.7k +0% 8.8k +15% 10.0k +30%
Summary: Under Zipf’s Law (s=1, f₁=100,000), Rank #10 has predicted frequency 10000 and accounts for 1.336% of total corpus volume (H_1000 = 7.485).
Summary: Under Zipf’s Law (s=1, f₁=100,000), Rank #10 has predicted frequency 10000 and accounts for 1.336% of total corpus volume (H_1000 = 7.485).
Interactive chart & math engine powered by CalculatorGraph

Formula & Mathematical Methodology: Zipf’s Law Rank-Frequency Formula

f(r) = f1 / rs
Probability(r) = (1 / rs) / Σk=1..N (1 / ks)
f(r) = f_1 / r^s; Probability(r) = (1 / r^s) / Σ_{k=1..N} (1 / k^s)
  • rank1TopFrequencyF1: Rank1 Top Frequency F1 (count)
  • targetItemRankR: Target Item Rank R (rank r)
  • zipfExponentS: Zipf Exponent S (s)
  • totalVocabularySizeV: Total Vocabulary Size V (items N)

Rounding: Internal floating-point calculations run in 64-bit IEEE-754 double precision; display values round to 2–4 decimal places.

Worked Example: Worked Mathematical Example: Zipf’s Law Rank-Frequency

Predict rank-r frequency f_r = f₁ / r^s and cumulative corpus share across N items.

  1. Specify the function parameters, matrix entries, or confusion matrix counts.
  2. Apply the closed-form or iterative formula: f(r) = f_1 / r^s; Probability(r) = (1 / r^s) / Σ_{k=1..N} (1 / k^s).
  3. Examine the primary result, error bounds, and 3 interactive SVG plots.
Result: Computes Zipf’s Law Rank-Frequency via f(r) = f_1 / r^s; Probability(r) = (1 / r^s) / Σ_{k=1..N} (1 / k^s).

Frequently Asked Questions

How does the Zipf’s Law Rank-Frequency (f_r = f₁ / r^s) & Generalized Harmonic Number Calculator compute the solution?

It evaluates f(r) = f_1 / r^s; Probability(r) = (1 / r^s) / Σ_{k=1..N} (1 / k^s) directly in your browser and updates three custom SVG visualizations in real time.

Can I solve backwards for an input parameter using Goal Seek?

Yes. Click "🎯 Goal Seek" in the results toolbar to solve backwards for any numeric input field.

Does this calculator run locally offline?

Yes. All calculations run 100% locally in your browser and work offline via the CalculatorGraph PWA.

Mathematics & Statistics · Econometrics & Regression

Zipf’s Law Rank-Frequency (f_r = f₁ / r^s) & Generalized Harmonic Number Calculator: inputs, method, and how to read the result

Predict rank-r frequency f_r = f₁ / r^s and cumulative corpus share across N items.

Choose inputs for the case you are checking

The defaults are illustrative. Replace them with values for your case and keep the units shown beside each field.

  • Rank1 Top Frequency F1: Frequency of the #1 top-ranked item (f₁).
  • Target Item Rank R: Rank r of the item to evaluate (r ≥ 1).
  • Zipf Exponent S: Zipf characterization exponent s (classic linguistic Zipf law s ≈ 1.0).
  • Total Vocabulary Size V: Total number of distinct ranked items N in the system.

What the calculation includes

With the default values shown, Predicted Frequency at Rank #10 is 10,000 occurrences. The calculation follows Zipf’s Law Rank-Frequency Formula; the formula and variable definitions above show how the inputs combine.

One-input check: With the other defaults held constant, changing Rank1 Top Frequency F1 from 100,000 count to 110,000 count changes Predicted Frequency at Rank #10 from 10,000 occurrences to 11,000 occurrences. This is a comparison inside the calculator's stated model, not a prediction.

Where to use caution

  • Uses exact analytical or standard numerical analysis formulations from NIST DLMF.
  • Double-precision floating-point arithmetic has ~15–17 significant decimal digits of precision.

Scope: Global Mathematical & Statistical Standard Check the assumptions and limitations against your situation before relying on the estimate.

More in Mathematics & Statistics: Scientific Calculator, Statistics & Standard Deviation Calculator, Permutations, Combinations, Probability, Sample Size & P-Value Calculator.