Staaarter

Percentage Difference Calculator

Calculates the percentage difference between two values by dividing the absolute difference by their average, useful when neither value is a 'before' or 'after'. A free online tool from Staaarter, right in your browser.

By Staaarter Team
calculatorpercentage
Runs locallyUpdated 2026-08-05

Overview

Introduction

Not every comparison has a clear 'before' and 'after', sometimes you just have two independent measurements and want to know how far apart they are, as a percentage.

This calculator finds that symmetric percentage difference, so it doesn't matter which value you type in first.

What Is Percentage Difference Calculator?

A calculator that finds the percentage difference between two values, by dividing the absolute difference between them by their average.

It runs entirely client-side as part of this site's Math Tools collection, so nothing you enter is ever uploaded to a server.

How Percentage Difference Calculator Works

The absolute value of the difference between the two inputs is divided by their average, then multiplied by 100 to express it as a percentage.

The calculation happens synchronously in JavaScript the moment you change either input, with no network round trip involved.

When To Use Percentage Difference Calculator

Use it whenever you're comparing two independent measurements, like two lab readings, two competing price quotes, or two sensor values, and neither one is naturally the 'starting point'.

If instead one value clearly came before the other in time, like a price last year versus this year, use the Percentage Change Calculator so the result correctly captures the direction of change.

Features

Advantages

  • Instant results as you type, with no submit button or network delay.
  • Symmetric by design, entering the two values in either order gives the same answer.
  • Avoids the ambiguity of picking a 'base' value when neither number is clearly the reference point.

Limitations

  • Cannot compute a result when both values are zero, since their average would also be zero.
  • Always returns a non-negative number, so it can't tell you which value is larger, only how far apart they are proportionally.

Examples

Comparing two price quotes

Input

First value: 120, Second value: 100

Output

18.18%

|120 - 100| / ((120 + 100) / 2) x 100 = 20 / 110 x 100 ≈ 18.18%.

Swapping the order gives the same result

Input

First value: 100, Second value: 120

Output

18.18%

|100 - 120| / ((100 + 120) / 2) x 100 = 20 / 110 x 100 ≈ 18.18%, identical to the previous example even though the inputs were swapped.

Best Practices & Notes

Best Practices

  • Use this tool when you genuinely have two independent measurements rather than a before-and-after pair, where order shouldn't matter to the result.
  • Remember the result is always a positive magnitude, pair it with the raw values if you also need to know which one was larger.

Developer Notes

Implemented as `(Math.abs(valueA - valueB) / ((valueA + valueB) / 2)) * 100` on plain JavaScript numbers, returning a discriminated union so a zero average (both inputs zero) surfaces as `{ success: false, error }` instead of `NaN`; the display value is rounded with `trimmedRound` from the Percentage Calculator's lib.

Percentage Difference Calculator Use Cases

  • Comparing two lab or sensor measurements of the same quantity
  • Evaluating how far apart two competing price or cost estimates are
  • Checking the spread between two independently collected survey or poll results

Common Mistakes

  • Using this tool for a before-and-after comparison, where the Percentage Change Calculator's signed, directional result is more appropriate.
  • Expecting a negative result when the 'first' value is smaller, this formula is symmetric and always returns a non-negative percentage.

Tips

  • If one of the two values is clearly the earlier or original measurement, use the Percentage Change Calculator instead to preserve the direction of change.
  • If you're checking a measured value against a known, correct value rather than comparing two independent measurements, use the Percentage Error Calculator.

References

Frequently Asked Questions