Skip to main content

Example values are filled in. Replace them with your own.

Percent error

2%

Working

  1. Absolute value of 9.8 − 10 = 0.2
  2. 0.2 ÷ 10 = 0.02
  3. 0.02 × 100 = 2%
Absolute error
0.2

Use the same unit for both values.

Percent error depends on the zero point of the scale. Convert degrees C or F to kelvin first.

Your measurement came out at 2.62 g/cm³ and the textbook says 2.70. Is that close enough? Percent error answers it in one number: how far your experimental value sits from the accepted one, as a share of the accepted one.

Enter both values below and the calculator returns the percent error with the working shown, in absolute form and with its sign. It handles negative results, decimals and scientific notation.

How percent error works

Quick answer: percent error is the absolute difference between the experimental and theoretical values, divided by the theoretical value, times 100. A measured 2.62 against an accepted 2.70 gives 2.96%.

What is percent error?

The percent error definition is how far an experimental (observed) value sits from a theoretical (true, accepted) value, as a percentage of the theoretical value. It is the standard accuracy check in chemistry and physics labs. Percentage error is the same calculation under another name, and the percent error equation is the formula below.

The percent error formula

percent error = abs(experimental - theoretical) / abs(theoretical) * 100%

The signed version drops the outer absolute value on the numerator, so the sign tells you whether you measured high or low:

signed percent error = (experimental - theoretical) / abs(theoretical) * 100%

How to find percent error, step by step

  1. Subtract the theoretical value from the experimental value.
  2. Take the absolute value of the result for the standard form, or keep the sign for the signed form.
  3. Divide by the absolute value of the theoretical value.
  4. Multiply by 100 and add the % sign.

Negative percent error

Percent error is negative only in the signed form, when the experimental value is below the theoretical one. Most textbooks and teachers expect the absolute form, so check which one your course uses.

Absolute error and relative error

Absolute error is the difference itself, in the original units. Here is how to calculate relative error: divide that difference by the theoretical value, before multiplying by 100. Percent error is relative error written as a percentage.

Rearranging the formula

To recover the experimental value from a known percent error, use: experimental = theoretical × (1 ± percent error ÷ 100). The plus applies when you measured high, the minus when you measured low.

What is a good percent error?

There is no universal cut-off. In school labs, under 5% is usually treated as good and 10% as acceptable, but the right target depends on your instrument and method. A large percent error often signals a systematic problem, such as a miscalibrated balance, because random scatter tends to average out over repeated readings.

Average percent error

To average several results, work out the percent error for each one, then add them and divide by how many there are. Errors of 2%, 4% and 6% average 4%. Use absolute values, because +4% and −4% would cancel to 0%.

Percent error examples

Example 1: density of aluminium

Given

You measure 2.62 g/cm³ and the accepted value is 2.70 g/cm³.
  1. Step 1

    The difference is 0.08, and 0.08 ÷ 2.70 = 0.0296.

Answer

The percent error is 2.96%.

Example 2: acceleration due to gravity

Given

A pendulum experiment gives g = 9.65 m/s² against 9.81 m/s².
  1. Step 1

    The difference is 0.16, and 0.16 ÷ 9.81 = 0.0163.

Answer

The percent error is 1.63%.

Example 3: percent error in a chemistry yield

Given

The theoretical yield is 12.5 g and you collect 11.2 g.
  1. Step 1

    The difference is 1.3, and 1.3 ÷ 12.5 = 0.104.

Answer

The percent error is 10.4%. For yield, many courses call the ratio 11.2 ÷ 12.5 the percent yield (89.6%), which is a different quantity.

Example 4: a ruler against a known length

Given

A rod is exactly 50.0 cm and your ruler reads 49.5 cm.
  1. Step 1

    The difference is 0.5, and 0.5 ÷ 50.0 = 0.01.

Answer

The percent error is 1.0%.

Example 5: negative percent error

Given

You weigh a reference mass of 9.0 g and the balance shows 8.4 g.

Answer

Signed: (8.4 − 9.0) ÷ 9.0 = −0.0667, so the percent error is −6.67%. The negative sign says you measured low; the absolute form is 6.67%.

Percent error code

Both versions return the same results as the examples above (2.96, 1.63, 10.4, 1.0 and −6.67) and reject a zero theoretical value.

JavaScript

JavaScript
export function percentError(experimental, theoretical, { signed = false } = {}) {  for (const [name, v] of [["experimental", experimental], ["theoretical", theoretical]]) {    if (typeof v !== "number" || !Number.isFinite(v)) throw new TypeError(`${name} must be a finite number`);  }  if (theoretical === 0) throw new RangeError("Percent error is undefined when the theoretical value is 0");  const diff = experimental - theoretical;  return ((signed ? diff : Math.abs(diff)) / Math.abs(theoretical)) * 100;}​export function parseInput(raw) {  let s = String(raw).trim();  // 1,200 is a thousands separator; 12,50 and 0,500 use the comma as a decimal point  if (/^[+-]?[1-9]\d{0,2}(,\d{3})+(\.\d+)?$/.test(s)) s = s.replace(/,/g, "");  else s = s.replace(",", ".");  return /^[+-]?(\d+\.?\d*|\.\d+)(e[+-]?\d+)?$/i.test(s) ? Number(s) : NaN;}

Python

Python
import math​def percent_error(experimental, theoretical, signed=False):    for name, v in (("experimental", experimental), ("theoretical", theoretical)):        if isinstance(v, bool) or not isinstance(v, (int, float)) or not math.isfinite(v):            raise ValueError(f"{name} must be a finite number")    if theoretical == 0:        raise ZeroDivisionError("percent error is undefined when the theoretical value is 0")    diff = experimental - theoretical    if not signed:        diff = abs(diff)    return diff / abs(theoretical) * 100​print(round(percent_error(2.62, 2.70), 2))  # 2.96

Privacy and input safety

The calculation runs in your browser. The two values you enter are not sent to a server or stored.

  • Inputs are read as numbers only. Text, empty fields and values such as NaN or Infinity are rejected with a message, never evaluated as code.
  • A comma followed by exactly three digits is read as a thousands separator, so 1,200 is 1200. Any other comma is a decimal point, so 12,50 is 12.50, and a number starting with 0, such as 0,500, is read as a decimal. Mixed formats such as 1.234,5 and ambiguous entries such as 1,2,3 are refused instead of guessed. Spaces, including no-break spaces, between digit groups are ignored.

Common percent error mistakes

Common percent error mistakes
MistakeWhat goes wrongWhat the calculator does
Dividing by the experimental valueGives a different, wrong percentage (Example 1 would show 3.05%)Always divides by the theoretical value
Swapping the two inputsThe absolute form changes only through the denominator; the signed form also flips signLabels both fields and shows the working
Forgetting to multiply by 100Result looks like 0.0296 instead of 2.96%Returns a percentage
Rounding mid-calculationSmall drift in the last digitRounds only the final result, to four decimal places with trailing zeros removed (a tiny error shows more places, not 0)
Theoretical value of 0Division by zeroShows "undefined" with the reason
Using temperatures in °CPercent error depends on the zero point of the scaleWarns for °C or °F; use kelvin
Mixing units2.62 g/cm³ against 2700 kg/m³ gives 99.9% instead of 2.96%Reminds you to use the same unit
Confusing it with percent differencePercent error has a true value; percent difference compares two equal measurementsLinks to the percent difference calculator

Percent error vs percent difference vs percent change

Percent error vs percent difference vs percent change
MeasureFormulaUse it whenNeeds a true value
Percent errorabs(experimental − theoretical) ÷ abs(theoretical) × 100Checking a measurement against an accepted valueYes
Percent differenceabs(a − b) ÷ ((a + b) ÷ 2) × 100Comparing two values of equal standingNo
Percent change(new − old) ÷ abs(old) × 100Tracking a value from an earlier to a later pointNo, but it has a direction in time
Relative errorabs(experimental − theoretical) ÷ abs(theoretical)Same as percent error, left as a fractionYes

Margin of error and standard error are statistical measures of sampling uncertainty. They do not compare one measurement with a known value, so they are not interchangeable with percent error.

Frequently asked questions

How do I calculate percent error?

Subtract the theoretical value from the experimental value, take the absolute value, divide by the theoretical value and multiply by 100. A measured 9.5 against an accepted 10 gives |9.5 − 10| ÷ 10 × 100 = 5%.

How do I calculate error?

How to calculate error depends on the layer you need. Absolute error is |measured − true|, relative error is the absolute error divided by the true value, and percent error is the relative error times 100. A measured 48 against a true 50 gives an absolute error of 2, a relative error of 0.04 and a percent error of 4%.

What is percent error?

It is how far a measurement sits from the accepted value, expressed as a percentage of that accepted value. It measures accuracy, meaning closeness to the true value, not precision, which is how repeatable the readings are.

Can percent error be negative?

Only in the signed form, when the experimental value is lower than the theoretical one. The standard form uses the absolute difference, so it is never negative.

How do I calculate relative error?

To find relative error, divide the absolute error by the theoretical value and leave the result as a decimal. Multiply by 100 to get percent error.

How do I calculate percent error in chemistry?

The percent error formula chemistry courses use is the same, with the theoretical yield or accepted constant as the denominator. Do not confuse it with percent yield, which is actual ÷ theoretical × 100.

What is the percent error formula?

Percent error = |experimental − theoretical| ÷ |theoretical| × 100. The theoretical value is the accepted or true one.