FLXCode Percentage Difference Calculator

FLXCode apps

Appearance

Percentage Difference Calculator

Compare two numbers as equals. You get the percentage difference, and one click shows percentage change instead if that is what you meant.

Percentage difference Example

Neither number is the "start". If one is, pick percentage change.

Compare and as
40%

40 and 60 differ by 40%.

This treats the two numbers as equals. If one is a starting value, switch to "percentage change".

  • Difference: |40 − 60| = 20
  • Average: (40 + 60) ÷ 2 = 50
  • 20 ÷ 50 × 100 = 40%

Percent error Example

Measured , true value
2.14%

A reading of 9.6 against 9.81 is off by 2.14%.

  • |9.6 − 9.81| ÷ 9.81 × 100 = 2.140673%

No ads. No account. Nothing you type or record is uploaded. We count page events with a daily code. Check it.

Problem or idea? Email us

Difference or change?

Many people search for "percentage difference" and mean "percentage change". They give different answers, so check which one you need.

Percentage differencePercentage change
Divides bythe average of boththe old number
Order mattersnoyes
Has a signno, always positiveyes, up or down
Good fortwo peers, two samplesbefore and after

The first row of the tool has a drop-down for this. For before and after numbers on their own, there is also a percentage change calculator.

Worked examples

SituationNumbersDifferenceChange from the first
Two phone plans, $40 and $6040 and 6040%+50%
Same pair, swapped60 and 4040%-33.33%
Two rooms, 12 ft and 15 ft wide12 and 1522.22%+25%
Two lab readings, 98.6 and 99.498.6 and 99.40.81%+0.81%
Same value twice, 25 and 2525 and 250%0%

Percent error examples

SituationMeasured vs truePercent error
Measured g as 9.6, true 9.81 m/s²9.6 vs 9.812.14%
Scale shows 498 g, test weight is 500 g498 vs 5000.4%
Estimated 1,150 people, real count 1,0001150 vs 100015%

By hand, in three steps

  1. Subtract and drop the sign. This is the gap.
  2. Add the two numbers and halve the sum. This is the average.
  3. Divide the gap by the average and multiply by 100.

Numbers this uses

  • 2: the average is the sum split between two numbers.
  • 100: turns the ratio into a percent.
  • Rounding: shown to 2 decimals, formula line to 6, rounded half up. The sums are exact underneath.
  • Upper limit: 200% for two positive numbers, reached when one is 0.

Nothing you type is uploaded. We count events without cookies (details).

FAQ

What is the formula for percentage difference?

The gap between the numbers divided by their average, times 100: |a − b| ÷ ((a + b) ÷ 2) × 100. For 40 and 60 the gap is 20, the average is 50, and 20 ÷ 50 × 100 = 40%.

Why is the answer different from percentage change?

Change divides by the starting number. Difference divides by the average of both, so neither one is "first". For 40 and 60, the difference is 40%, but going from 40 to 60 is a 50% change. Use the switch in the tool to see both.

When do I want difference and when do I want change?

Use difference when two numbers stand side by side as equals, like two shops, two samples, or two measurements. Use change when one number came earlier, like last year and this year. If you are unsure, ask whether you can say "from" and "to". If yes, you want change.

Does the order of the two numbers matter?

Not for difference. 40 and 60 gives 40% either way. It does matter for change.

What is percent error?

How far a measured or estimated value is from the true one, as a share of the true value: |measured − true| ÷ |true| × 100. It divides by the true value, not the average, so it is its own row.

Can the percentage difference be above 100%?

Yes. 1 and 9 differ by 8, the average is 5, and 8 ÷ 5 × 100 = 160%. The most it can be for two positive numbers is 200%, when one of them is 0.

Why does it fail for numbers like 5 and -5?

Their average is 0, and dividing by 0 has no answer. The tool says so rather than guess. With a positive and a negative number, state the gap itself.

Is my data sent anywhere?

No. The sums run in your browser, and nothing you type is stored or counted.

More from FLXCode

Share Percentage Difference Calculator