Harmonic Number Calculator
Find any harmonic number Hₙ.
Result
How it is calculated
The n-th harmonic number is the sum of the reciprocals of the first n whole numbers: Hn = 1 + 1/2 + 1/3 + … + 1/n. The tool adds the terms one by one and shows the total to six decimals. The input is cut down to a whole number (10.9 is read as 10) and must lie between 1 and 1,000,000; anything outside that range gives no result. The sum grows without limit but very slowly, roughly like ln n + 0.5772, where 0.5772 is the Euler–Mascheroni constant. That approximation is a quick check on the exact figure.
Worked example
For n = 10, add 1 + 0.5 + 0.3333 + 0.25 + 0.2 + 0.1667 + 0.1429 + 0.125 + 0.1111 + 0.1. The tool, which keeps full precision for each term, reports 2.928968. The quick estimate ln 10 + 0.5772 + 1/20 is about 2.9298, close to the exact value. For n = 100 the sum is 5.187378, so ten times as many terms add only about 2.26.
Common mistakes
- Entering a decimal such as 10.9 and expecting rounding. The tool drops the fraction and uses 10.
- Expecting the series to settle at a limit. Unlike the sum of 1/2k, the harmonic series grows forever, only slowly.
- Confusing Hn with 1/n. The harmonic number is the sum of all reciprocals up to n, not the last one.
- Entering 0 or a negative number, or a value above 1,000,000. The tool returns no result for these.
- Using the ln n estimate without the 0.5772 constant, which misses the result by more than half a unit.
About this calculator
The nth harmonic number is the sum of reciprocals Hₙ = 1 + ½ + ⅓ + … + 1/n. It grows without bound but very slowly, approximately Hₙ ≈ ln(n) + γ, where γ ≈ 0.5772 is the Euler–Mascheroni constant — a fact famously counter-intuitive to students seeing the harmonic series diverge for the first time despite its terms shrinking to zero.
Computer scientists rely on harmonic numbers to analyze algorithm complexity — they appear in the average-case running time of quicksort, the expected number of trials in the coupon collector's problem, and the analysis of hashing and randomized algorithms. Mathematics students and educators also use them to illustrate series convergence versus divergence.
Was this helpful?
You can pick up to 3 reactions.
Popular calculators
Loan Calculator
Monthly payment, total interest and full amortization schedule.
Percentage Calculator
Percent change, percent of, and ratio calculations.
Discount Calculator
Calculate final price, savings, and discount amount.
BMI Calculator
Body mass index from height and weight (metric or imperial).
Age Calculator
Compute your exact age in years, months and days from a birth date.
Compound Interest Calculator
Calculate the final amount and interest earned with compounding.
All Calculators
- Loan Calculator
- Profit Calculator
- Discount Calculator
- BMI Calculator
- Percentage Calculator
- Ideal Weight Calculator
- Age Calculator
- Pregnancy Due Date Calculator
- Compound Interest Calculator
- BMR Calculator (Basal Metabolic Rate)
- Tip Calculator
- Fuel Cost Calculator
- Date Difference Calculator
- Sleep Cycle Calculator
- Daily Water Intake Calculator
- Simple Interest Calculator
- Heart Rate Zones Calculator
- Running Pace Calculator
- Pet Age Calculator
- Calories Burned Calculator
- Macro Calculator
- TDEE Calculator (Total Daily Energy Expenditure)
- Waist-to-Hip Ratio Calculator
- Honor Roll Calculator
- One Rep Max (1RM) Calculator
- Ovulation Calculator
- Electricity Cost Calculator
- Unit Price Calculator
- Savings Goal Calculator
- Break-Even Point Calculator
- Paint Calculator
- Course Grade Average Calculator
- Business Days Calculator
- Time Duration Calculator
- Fuel Economy Calculator
- Temperature Converter
- Tile Calculator
- Aspect Ratio Calculator
- Roman Numeral Converter
- Goal Weight Timeline Calculator
- Salary Converter (Hourly to Annual)
- Credit Card Validator (Luhn)
- Body Surface Area (BSA) Calculator
- Feels-Like Temperature Calculator
- Ohm’s Law Calculator
- PPI (Pixel Density) Calculator
- Molar Mass Calculator
- Zodiac Sign Calculator (Western + Chinese)
- IBAN Validator
- Shoe Size Converter
- Country Info & Dialing Code Lookup
- Time Zone Difference (World Clock)
- CAGR (Compound Annual Growth Rate) Calculator
- Rule of 72 Calculator
- Blood Alcohol Content (BAC) Calculator
- Lean Body Mass (LBM) Calculator
- Pythagorean Theorem Calculator
- Speed Converter
- Download Time Calculator
- Date Calculator (Add/Subtract)
No calculators found
Comments