StatGardenREF. DESK
Calculators/Everyday/Difference between two numbers
Everyday

Difference between two numbers calculator

Absolute difference, percentage difference and percentage change between two numbers.

What this calculator does

What is the difference between two numbers can mean more than one thing, which is exactly why this calculator shows all three common readings at once: the plain absolute difference, the percentage difference between them treating neither as a fixed starting point, and the percentage change from the first number to the second.

The three figures answer genuinely different questions. The absolute difference is just the gap in the same units as the numbers themselves. Percentage difference compares that gap to the average of the two numbers, useful when neither is clearly the "before" figure. Percentage change treats the first number as the baseline and asks how far the second has moved from it, which is the one that can be negative.

The formula

FormulaAbsolute difference = |A − B|; Percentage difference = |A − B| / ((A + B)/2) × 100; Percentage change = (B − A)/A × 100

Absolute difference is the two numbers subtracted and the result made positive. Percentage difference divides that gap by the average of the two numbers. Percentage change divides the gap, kept signed, by the first number, which is why it needs a nonzero starting figure.

TermMeaning
Absolute differenceThe gap between the two numbers, always shown as a positive figure: |A − B|.
Percentage differenceThe gap expressed relative to the average of the two numbers, with neither treated as the baseline.
Percentage changeThe gap expressed relative to the first number only, which is treated as the starting value.

The inputs explained

FieldWhat to enter
First numberThe first number. Treated as the starting value for the percentage change figure.
Second numberThe second number being compared against the first.

When to use it

Comparing two figures with no obvious "before" and "after"

Comparing two suppliers’ prices, or two survey results, is a case for percentage difference, since neither number is naturally the baseline the other is measured against.

Measuring a change over time

Comparing a value at the start and end of a period, such as a price, a headcount or a measurement, is a case for percentage change, which correctly shows an increase as positive and a decrease as negative.

Checking the plain numeric gap

Sometimes the actual gap in real units is what matters, not a percentage at all, which the absolute difference gives directly.

Worked examples

Every figure in the tables below is produced by this page’s own calculator at build time, so the numbers and the tool always agree. Select any row to load that scenario.

How the three figures move as the second number rises, from a fixed first number

A first number fixed at 100, compared against a range of second numbers.

First number fixed at 100
Second numberDifference (absolute)Percentage differencePercentage change from first to second
802022.2%-20.0%
901010.5%-10.0%
10000.000%+0.000%
110109.52%+10.0%
1252522.2%+25.0%
1505040.0%+50.0%
Percentage change turns negative once the second number drops below the fixed first number of 100, while percentage difference stays positive throughout since it only measures the size of the gap, not its direction.

Questions

What is the difference between percentage difference and percentage change?

Percentage difference compares the gap to the average of the two numbers and is always positive, treating the comparison as symmetric. Percentage change compares the gap to the first number specifically and can be positive or negative, treating the first number as a baseline the second has moved away from.

Why does percentage change show "N/A" sometimes?

Percentage change divides by the first number, so if that number is zero the calculation is undefined and cannot be shown as a percentage; the absolute difference and, where possible, the percentage difference are still shown.

Which figure should I use for a price comparison?

If one price is clearly the original and the other the new price, use percentage change. If the two prices are simply being compared against each other with neither as a baseline, such as two competing quotes, percentage difference is the more even-handed figure.

Can the absolute difference ever be negative?

No. It is always shown as a positive figure, the size of the gap between the two numbers regardless of which one is larger; which number is larger is stated separately.

For a difference expressed purely as a percentage change over time, see the percentage change calculator. For the three everyday percentage questions, including what percentage one number is of another, use the percentage calculator.