Percent difference between two numbers

Enter two values to get the absolute difference, the symmetric percentage difference against their mean, and the directional percent change from one to the other.

Try:
Comparison

About the percent difference calculator

Enter two numbers and this calculator reports how far apart they are, three ways at once:

Set Measures to report to difference or change to show only one block, and Decimal places (0–10) to control display precision. The arithmetic itself is always done at full double precision; the setting only rounds what is printed. Everything runs locally in your browser — nothing is uploaded, and it keeps working offline once the page has loaded.

Worked example: 70 and 85

StepCalculationResult
Absolute differenceabs(70 − 85)15
Mean (midpoint)(70 + 85) / 277.5
Percent difference15 ÷ 77.5 × 10019.3548%
Percent change a → b15 ÷ 70 × 10021.4286% increase
Percent change b → a−15 ÷ 85 × 100−17.6471%
Ratio b / a85 ÷ 701.2143

The two percentages differ because they divide by different things: 77.5 (the midpoint) versus 70 (the starting value). Both are correct answers to different questions, which is why they are shown side by side.

More examples

Limits and edge cases

FAQ

What is the difference between percent difference and percent change?

Percent change has a direction: it divides by the starting value, so going from 100 to 120 is a 20% increase while going from 120 to 100 is a 16.67% decrease — the same pair of numbers, two different answers. Percent difference divides by the mean of the two values instead, so it is symmetric: 100 and 120 are 18.18% apart no matter which you name first. Pick change when one value is a baseline, difference when the two values are peers.

Why does swapping the two values not change the percent difference?

Because the formula uses |a − b| and the mean (a + b) / 2, and both are unchanged when you swap the inputs. That is the whole point of the symmetric measure — it does not force you to pick which value is the reference. The trade-off is that it cannot be inverted: knowing the percentage and one value is not enough to recover the other, since the absolute value has thrown away the sign.

Can the percent difference be more than 100%?

Yes. It reaches exactly 100% when one value is three times the other (for example 25 and 75), and climbs towards a ceiling of 200% as one of two same-signed values approaches zero. Because of that ceiling, values that are orders of magnitude apart all report a percentage close to 200% — the calculator adds a note past a 10× ratio suggesting percent change instead.

What happens with zero or with negative numbers?

Negative numbers are fine. Percent difference compares magnitudes, so −70 and −85 are 19.3548% apart just like 70 and 85. Zeros are where measures genuinely stop existing: percent change needs a non-zero starting value, and percent difference needs a non-zero mean, so 5 and −5 has no percent difference at all. In all mode the undefined measure is dropped and explained; in a single-measure mode it is reported as an error.

Is percent difference the same as percent error?

No. Percent error compares a measurement against a known true value and divides by that true value, which makes it directional like percent change. Percent difference is for two values of equal standing where neither is the accepted reference. If one of your numbers is a reference or expected value, use the change measure with that value as a.

Is it free and private?

Yes. The calculation runs entirely in your browser as WebAssembly — the numbers you type never leave your device, no account is needed, and the page keeps working with no network connection.

Developer & Automation Access

Run it from the terminal

Same engine as this page, headless — via the gizza CLI:

gizza tool percent-difference-calculator "70" 'b=85'

New to the CLI? Get gizza →

Open it by URL

Pre-fill and auto-run this tool with query parameters — the names match the API/CLI:

https://gizza.ai/tools/percent-difference-calculator/?a=70&b=85&mode=all&decimals=4

Machine-readable descriptor: tool.json — title + parameters JSON Schema for agents.