Statistics & probability

Harmonic mean calculator

Average positive rates with an equal numerator basis.

Harmonic mean calculator
Esc to restore

Your inputs

Up to 50,000 values. No thousands separators. Absolute values up to 1 trillion; non-zero values must be at least 1e-100 in magnitude.

Results update as you type. Larger files run when you press Update result.

Your result

Your result will appear here.

More actions

Your inputs stay in this browser. Nothing is uploaded or saved.

A clear answer. Here’s how.

Harmonic mean = n/sum(1/x), for strictly positive values. It is appropriate for certain rate averages when each observation has the same numerator, such as equal-distance travel speeds. It is not the general average for unequal distances or equal travel times.

How this is checked

3 reference checks passed These 3 cases were run when this page was built, on 3 December 2026, and all reproduce within the stated tolerance. The same cases are part of the automated tests that run on every change to Toolmoz. Engine version 1.

See the checks and where each expected answer comes from
  1. Case 1

    Inputs
    Values, separated by commas or new lines 30, 60
    Expected, and what Toolmoz gave
    Harmonic mean expected 40, Toolmoz 40Count expected 2, Toolmoz 2
    Where the expected answer comes from
    2 ÷ (1/30 + 1/60) = 2 ÷ (3/60) = 2 × 20 = 40: the average speed over two equal distances at 30 and 60
    Allowed difference
    ±1e-12 relative
  2. Case 2

    Inputs
    Values, separated by commas or new lines 60, 40
    Expected, and what Toolmoz gave
    Harmonic mean expected 48, Toolmoz 47.99999999999999
    Where the expected answer comes from
    2 ÷ (1/60 + 1/40) = 2 ÷ (5/120) = 2 × 24 = 48
    Allowed difference
    ±1e-12 relative
  3. Case 3

    Inputs
    Values, separated by commas or new lines 1, 2, 4
    Expected, and what Toolmoz gave
    Harmonic mean expected 1.7142857142857142, Toolmoz 1.7142857142857142
    Where the expected answer comes from
    3 ÷ (1 + 1/2 + 1/4) = 3 ÷ 1.75 = 12/7 = 1.714286
    Allowed difference
    ±1e-12 relative

What this shows: the engine reproduces independently worked values for these cases. It does not prove every possible input is right. To test an answer you were given, see how to check a number; to see what is and is not checked across Toolmoz, see the accuracy ledger.

See a worked example

Worked example

A fixed demonstration, separate from the values you enter above.

Values, separated by commas or new lines
30, 60

Example result

Harmonic mean
40
Count
2