lets say i have two values a = 6357.29; b = 5595.15. I want to caculate the difference…
- User
lets say i have two values a = 6357.29; b = 5595.15. I want to caculate the difference in percentage. Which formula should I use. (a-b)/b or (b-a)/a
Assistant
For calculating percentage difference, you should use (a-b)/b.
This gives you the percentage change from b to a, which in your case would be: (6357.29 - 5595.15) / 5595.15 = 762.14 / 5595.15 ≈ 0.1362 or 13.62%
This means a is 13.62% larger than b.
The formula (b-a)/a would give you the percentage change from a to b, which would be negative in this case since b is smaller than a: (5595.15 - 6357.29) / 6357.29 = -762.14 / 6357.29 ≈ -0.1199 or -11.99%
This means b is 11.99% smaller than a.
The choice depends on your perspective - which value you're treating as the reference point. Typically, if you're comparing a new value to an old value, you'd use the old value as the denominator.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.