Calculating Percent Difference with zero and near zero values

4.3k Views Asked by At

I'm trying to calculate the percent difference between an expected measurement and the actual measurement. I'm using the formula

Percent Difference = ((Measured value - Expected value)) / Expected value) * 100

So if I measure a value of 23, and I expected a value of 20:

Percent Difference = ((23-20)/20) * 100 
Percent Difference = 15

And I get a negative value if the measured value comes in below the expected value:

Percent Difference = ((17-20)/20) * 100 
Percent Difference = -15

I"m assuming this is the best way to calculate a percent difference. But what do I do if the expected value is 0 (I can't divide by zero). The above calculation gives works for larger numbers, but gives me really large values as I approach zero.

If I'm expected a value of zero, but get something close (AKA 0.5), if I approximate zero with a small number, I get a crazy value

Percent Difference = ((0.5-0.001)/0.001) * 100
Percent Difference = 49900

Or even

Percent Difference = ((0.5-0.1)/0.1) * 100
Percent Difference = 400

Is there a better way to characterize a difference with small numbers?