tooldeb Online Tools
Categories
Finance & Investing Interest, savings, returns, and inflation. Loans & Property Mortgages, repayment, DSR/DTI/LTV, and jeonse. Tax & Payroll Take-home pay, severance, insurance, and taxes. Shopping & Pricing Discounts, tips, unit price, and margins. Health & Fitness Body metrics, nutrition, and training. Math Percentages, fractions, algebra, and sequences. Geometry Area, volume, and surface of plane and solid shapes. Statistics & Probability Averages, spread, combinations, and odds. Unit Conversion Length, weight, temperature, pressure, and more. IT & Digital Data size, screens, color, and network speed. Engineering & Electronics Circuits, resistance, PCB, and signals. Date & Time Ages, D-day, date math, and time zones. Home & Interior Paint, tile, wallpaper, flooring, and concrete. Automotive Fuel cost, economy, tires, and vehicle tax. Everyday Bills, delivery, photos, and odds and ends.
EN
한국어 English

Mean Calculator (Arithmetic, Geometric, Harmonic)

Enter two positive numbers to compare their arithmetic, geometric, and harmonic means side by side.

Inputs
Arithmetic mean
10.0000
Geometric mean
8.0000
Harmonic mean
6.4000
Both numbers must be positive (a > 0, b > 0) — the standard domain for these three means. Non-positive input shows "—".

How the three means are calculated

These are the classical "Pythagorean means" — three ways to average two positive numbers, each built for a different kind of quantity.

AM = (a + b) / 2 GM = √(ab) HM = 2ab / (a + b)
  • a, b — the two positive numbers
  • AM — arithmetic mean — simple average
  • GM — geometric mean — square root of the product
  • HM — harmonic mean — reciprocal of the average of reciprocals

More detail

AM ≥ GM ≥ HM, always

For any two positive numbers, the arithmetic mean is never smaller than the geometric mean, which is never smaller than the harmonic mean. This is the AM-GM-HM inequality, a standard result in mathematics. The three values only meet — all equal — when a = b.

When to use which mean

Arithmetic mean fits everyday averaging (test scores, prices). Geometric mean fits growth rates and ratios (e.g. averaging annual returns). Harmonic mean fits rates over a fixed quantity, like averaging speeds over the same distance — a trip at 30 km/h and 60 km/h over equal distances averages to 40 km/h, not 45.

Quick check. Set a = b to any everyday value — all three means collapse to that same number, which is a fast way to sanity-check the calculator. Above roughly 9.5e153 the harmonic mean overflows double precision — its numerator is 2ab — and above 1.35e154 the product ab itself overflows, so the geometric mean follows.

Frequently asked questions

What's the difference between arithmetic and geometric mean?

Arithmetic mean is (a+b)/2, the familiar average. Geometric mean is √(ab), the square root of the product — it's more appropriate for values that multiply together, like growth rates or ratios, since it doesn't overweight large outliers the way a plain average can.

When should I use the harmonic mean instead?

Harmonic mean (2ab/(a+b)) is the right average for rates measured over a fixed base, like speed over the same distance. For example, driving equal distances at 30 km/h and 60 km/h averages to 40 km/h — the harmonic mean — not the arithmetic mean of 45.

Is AM always greater than or equal to GM and HM?

Yes — the AM-GM-HM inequality guarantees AM ≥ GM ≥ HM for any two positive numbers, with equality only when a = b. Try a = 4, b = 16 above: AM = 10, GM = 8, HM = 6.4, matching the inequality.

Why does the calculator show "—" for some inputs?

All three means require both numbers to be strictly positive (a > 0, b > 0) — geometric and harmonic mean aren't defined for zero or negative inputs in this standard form, so the calculator shows "—" instead of a misleading number.

Why are all three means equal when a = b?

When a = b, (a+b)/2 = a, √(a·a) = a, and 2a²/(2a) = a — every formula reduces to the same value. This is also the equality case of the AM-GM-HM inequality: the means only coincide when there's no spread between the two numbers.

Related calculators

Browse all Statistics calculators