Can you give me the formulas for calculating percentage differences between two numbers? For example: if the first number is 10 and the second number is 15, then the second number is 50% larger than the first number. However, the formula to calculate that percentage won't work if the first number is greater than the second number as in the following example: The first number is 15 and the second number is 10, with the second number being 33.3% less than the first number. Or maybe I'm mistaken and the same formula will work in both situations.
I used to know this stuff (honest), but the old brain isn't what it used to be. We are writing a computer program to calculate the percent increase or decrease of a stock price over time.
Thanks for your help.
Best Regards, Tedd
When calculating a percentage it is necessary to ask "the percentage of what?" If a quantity changes from some value before the change to another value after the change then the "percentage change" is the difference, as a percentage of the value BEFORE the change.
In your first example the number before the change was 10 and after the change was 15. Thus the difference is 15 - 10 = 5 and the value before the change is 10. Hence the percentage change is
In your second example the value changed from 15 to 10 so again the difference is 5 but the value before the change was 15. Hence the percentage change is