Difference Calculator

Calculate absolute difference and percentage difference between two values instantly. Perfect for comparing prices, scores, measurements, analytics, or performance metrics.


Values
Absolute Difference
0
Percentage Difference
0%

About the Difference Calculator

The Difference Calculator computes both the absolute difference and the percentage difference between two numbers. Use it to compare prices, measurements, scores, or any two values and understand both the raw gap and the relative variation.

Formulas Used

Absolute Difference   = |Value₂ − Value₁|

Percentage Difference = (|Value₂ − Value₁| ÷ ((Value₁ + Value₂) ÷ 2)) × 100

The percentage difference formula uses the average of both values as the denominator — making it symmetric (the result is the same regardless of which value is entered first).

Example Calculations

  • 100 and 120: Absolute = 20, Percentage = 18.18%
  • 80 and 100: Absolute = 20, Percentage = 22.22%
  • 500 and 750: Absolute = 250, Percentage = 40%
  • −50 and 50: Absolute = 100, Percentage = Undefined (the average is 0, so the denominator is 0)

Absolute vs. Percentage Difference

  • Absolute difference tells you the raw gap in the same unit as the values. Use this when the actual magnitude matters — e.g., "Product A is $20 more expensive."
  • Percentage difference tells you the relative size of the gap. Use this when comparing values of different magnitudes or when you want a unit-free result — e.g., "These two readings differ by 8%."

Percentage Difference vs. Percentage Change

These are closely related but serve different purposes:

  • Percentage Difference — symmetric, uses the average of both values. Best when neither value is clearly the "original" (e.g., comparing two competitors' prices).
  • Percentage Change — directional, uses the original (old) value as the denominator. Best for tracking how a value changed over time (e.g., month-over-month revenue). Use the Percentage Change Calculator for this.

Example: comparing 100 and 120 gives a percentage difference of 18.18% but a percentage change of 20%.

Worked Examples Step by Step

Following the full working makes the symmetric formula easy to reproduce by hand:

Example 1 — Comparing two prices: $45 vs $55
Absolute difference   = |55 − 45| = 10
Average               = (45 + 55) ÷ 2 = 50
Percentage difference = (10 ÷ 50) × 100 = 20%

Example 2 — Two lab readings: 6 and 8
Absolute difference   = |8 − 6| = 2
Average               = (6 + 8) ÷ 2 = 7
Percentage difference = (2 ÷ 7) × 100 ≈ 28.57%

Example 3 — Order doesn't matter: 200 vs 180
Absolute difference   = |180 − 200| = 20
Average               = (200 + 180) ÷ 2 = 190
Percentage difference = (20 ÷ 190) × 100 ≈ 10.53%

In Example 3, swapping the inputs to 180 and 200 produces exactly the same numbers — proof that the result is symmetric.

Quick Comparison Reference Table

A few worked pairs showing both outputs side by side:

Value 1Value 2Absolute Diff.Percentage Diff.
1001202018.18%
40602040%
257550100%
109080160%
15015000%

Notice how the percentage can climb above 100% (as with 10 vs 90) when the gap is large relative to the midpoint of the two numbers.

Related Concepts

  • Absolute value: a number's distance from zero, written with bars (|−7| = 7). It is what keeps the difference positive.
  • Average (midpoint): the halfway point between the two values, used as the denominator for percentage difference.
  • Percentage change: a directional comparison against an original value — see the Percentage Change Calculator.
  • Ratio: one value divided by another, expressing how many times larger one is.
  • Variance / spread: in statistics, how far apart a set of values is — the difference is the simplest two-value version.

Tips and Common Mistakes

  • Don't mix up the two percentages. Percentage difference (symmetric, divides by the average) is not the same as percentage change (directional, divides by the original). For 100 vs 120 they are 18.18% and 20% respectively.
  • Watch for a zero average. If the two values are equal and opposite (e.g. −50 and 50), their average is 0 and the percentage difference is undefined — not zero.
  • Pick the right metric. Use absolute difference when the raw unit matters and percentage difference when comparing items of very different sizes.
  • Mind the sign on inputs. The formula's absolute value keeps the answer positive, but a misplaced minus sign still changes the average and therefore the percentage.

Common Use Cases

  • Price comparison — how much more or less does one product cost vs. another?
  • Test scores — gap between two students' or two attempts' results
  • Scientific measurements — variation between two experimental readings
  • Sports analytics — comparing player or team statistics side by side
  • A/B testing — relative gap between two conversion rates or metrics
  • Budget variance — how far actual spending lands from a forecast figure

For related math tools, see the Percentage Calculator to find what percent one value is of another, or the Average Calculator to find the mean across a data set.

Frequently Asked Questions

How do you calculate the difference between two numbers?

Subtract one value from the other. The absolute difference always gives a positive result: |Value₂ − Value₁|. For example, |120 − 100| = 20, and |100 − 120| = 20 — order doesn't matter.

What is the formula for percentage difference?

Percentage Difference = (|Value₂ − Value₁| ÷ ((Value₁ + Value₂) ÷ 2)) × 100. This uses the average of both values as the denominator, so the result is symmetric regardless of which value comes first.

How is percentage difference different from percentage change?

Percentage difference is symmetric — it uses the average of both values and doesn't assume one is the 'original.' Percentage change is directional — it divides by the original (old) value to measure growth or decline. For 100 vs 120: percentage change = 20%, but percentage difference = 18.18%.

Can percentage difference exceed 100%?

Yes. If two values are far apart relative to their average, percentage difference can exceed 100%. For example, 10 and 90 have an average of 50 and an absolute difference of 80, producing a percentage difference of 160%. Note that −50 and 50 do not give a finite percentage at all — their average is 0, so the percentage difference is undefined.

When should I use absolute difference vs. percentage difference?

Use absolute difference when the raw unit matters (e.g., '$20 cheaper'). Use percentage difference when comparing values of different magnitudes, or when you want a unit-free relative comparison (e.g., '18% different').

When is percentage difference undefined?

If both values are 0, the denominator becomes 0 and percentage difference is undefined. The calculator handles this gracefully without crashing.

Can I enter negative or decimal numbers?

Yes. Negative values and decimals are fully supported. The absolute value in the formula ensures the result is always positive regardless of sign.

Does the order of the two values affect the result?

No. Both the absolute difference and the percentage difference are symmetric. Entering 100 and 120 gives the same results as entering 120 and 100, because the formula uses an absolute value on top and the average of both numbers on the bottom.

What does a percentage difference of 0% mean?

It means the two values are identical. For example, 150 and 150 have an absolute difference of 0 and a percentage difference of 0%. Any non-zero result tells you how far apart the two values are relative to their midpoint.

How do I calculate percentage difference by hand?

Find the absolute difference (subtract and drop the sign), divide it by the average of the two numbers, then multiply by 100. For 6 and 8: the difference is 2, the average is 7, so 2 ÷ 7 × 100 = 28.57%.

Why use the average as the denominator instead of one of the values?

Dividing by the average treats both numbers as equal partners, so neither is assumed to be the 'correct' or 'original' value. That makes the comparison fair and symmetric — ideal when comparing two independent readings, prices, or measurements where there is no obvious baseline.

What is the difference between difference and ratio?

A difference subtracts (8 − 6 = 2, an absolute gap), while a ratio divides (8 ÷ 6 ≈ 1.33, meaning one value is about 1.33 times the other). Use a difference for 'how much bigger' and a ratio for 'how many times bigger.'