I frequently use this formula to compare two positive numbers $x$ and $y$ to see if they are "more different" than some threshold:

$$ x-y \over \max(x,y) $$

It is nice because it is symmetric and bounded to $[-1,1]$ (unlike relative percent difference). I call it a "symmetric percent difference." I see a similar formula on this Wikipedia page, apparently generalized to negative or positive numbers, but it's not named:

$$ |x-y| \over \max(|x|,|y|) $$

Does anyone know the official name for this function?

Note: Another similar function, bounded to $[0,1]$, is used to calculate sMAPE:

$$ |x-y| \over x+y $$

  • $\begingroup$ What would make a name 'official'? $\endgroup$
    – Glen_b
    Commented Nov 6, 2013 at 1:06
  • $\begingroup$ I'd be happy with a citation of any named usage, bonus if it's a scholarly article or textbook. But possibly the formula is not used frequently enough to be named. $\endgroup$
    – J. Miller
    Commented Nov 6, 2013 at 1:14
  • 1
    $\begingroup$ Any? Okay, well here it's called a 'symmetric percent difference'. But that term seems to mean different things in other places. To be honest, I don't think there's going to be a widely used name for it. $\endgroup$
    – Glen_b
    Commented Nov 6, 2013 at 2:15
  • 1
    $\begingroup$ @Glen_b, I guess then I'm an official source now :). Yes, I saw a few other things referred to by this name when I was googling around. I think the name best describes my formula though! $\endgroup$
    – J. Miller
    Commented Nov 8, 2013 at 20:01

1 Answer 1


The last function you mention is the coefficient of variation (standard deviation over mean) of a sample of just two values:

$$c_v = \frac {\sigma}{\mu}$$ and when we have only two values, $\sigma = |x-y|/2$ while $\mu = (x+y)/2$.

As for your function, although by not using absolute value in the numerator you hint that direction may be important to you, I expect usually subtracting the smallest from the largest value. Then, since our sample is only these two numbers essentially we have

$$\frac {\text {range}}{\max} = \frac {\max - \min}{\max} = 1- \frac {\min}{\max}$$

Now the $\frac {max}{min}$ ratio is encountered in various situations, check for example, "dynamic range" or "contrast ratio".

On a more mundane level, if $x$ is "final price"$=p_f$ and $y$ is "list price"$=p_l$, then

$$\frac {x-y} {\max(x,y)} = \frac {p_f -p_l}{p_l} $$

equals the "percentage discount" -with the negative sign to indicate the direction of revenues!

  • $\begingroup$ Yes, direction is often important. Answer accepted for drawing attention to the similarities with CV and "dynamic range". On the price-discount formula ... not apropos since it's naturally asymmetric (list price is the reference point). $\endgroup$
    – J. Miller
    Commented Nov 8, 2013 at 20:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.