How we calculate: formulas, conventions and test cases
Every calculator on this site runs on one small engine. These are its formulas and conventions, how it rounds, and the 43 test cases it must pass before any page is published.
Formulas
| Measure | Formula |
|---|---|
| Percentage change | (new - old) / old x 100 |
| With a negative starting value | (new - old) / |old| x 100 |
| Percent difference | |a - b| / ((a + b) / 2) x 100 |
| Percent error | |measured - accepted| / |accepted| x 100 |
| Percentage point change | new_rate - old_rate (both already percentages) |
| Add or subtract a percentage | value x (1 + p/100); value x (1 - p/100) |
| Reverse percentage | original = new / (1 + p/100); original = new / (1 - p/100), not defined when p = 100 |
| CAGR | (end / start)^(1 / years) - 1 |
| Annualized change | ((later / earlier)^(m / n) - 1) x 100, where m = periods per year and n = periods elapsed |
| Successive changes | (product of (1 + p_i/100) - 1) x 100 |
| Loss recovery | required gain = 1 / (1 - loss/100) - 1 |
| Real change | (1 + nominal) / (1 + inflation) - 1 |
| Lower-is-better improvement | (old_time - new_time) / old_time x 100; (old_time / new_time - 1) x 100 |
| Log change | ln(new / old) x 100 (log points) |
Conventions
- Zero starting value: no percentage change is shown. The calculators say it is not defined and give the absolute change. From zero to zero is no change.
- Negative starting value: the change is divided by the size of the starting value, a convention also used by CalculatorHub.com, so a rise reads as positive. The result panel always shows the absolute change and what a plain spreadsheet formula would give.
- Percent difference: divides by the average of the two values. The other denominators in use are shown beside it.
- CAGR: needs a start above zero and an end of zero or more, as Google's RRI does. Dates are turned into years as exact days divided by 365.25.
- Percentage points: a basis point is one hundredth of a percentage point, a market convention.
Rounding and number formats
The engine calculates in full double precision from the numbers you type and rounds only for display: percentages to two decimal places, multipliers to six significant figures, money to the cent. Where a page shows a difference between two displayed figures, it is computed from the rounded figures, so the arithmetic on the page adds up.
Rounding is half away from zero, done in a way that avoids binary floating point slips: the change from 0.1 to 0.3 shows as 200.00%, not a hair under. Pages are built with a decimal point; in your browser you can switch to a decimal comma, and the calculators read grouped numbers such as 1,234.5 or 1.234,5.
Test cases
The engine must reproduce each result below to the precision it is written to, and each published figure at the source's own rounding. 31 are official worked examples, 3 are calculator site examples used only to check a convention, and 9 are cases we constructed ourselves to cover edges such as zero, negative values and floating point.
| Case | What it checks | Our engine | Source shows | Label | Source |
|---|---|---|---|---|---|
| 1 | Percentage change from 277.948 to 278.802 | 0.30725172 | 0.3 | Official worked example | US Bureau of Labor Statistics, Calculating percent changes (CPI factsheet) |
| 2 | Percentage change from 278.802 to 296.797 | 6.45440133 | 6.5 | Official worked example | US Bureau of Labor Statistics, Calculating percent changes (CPI factsheet) |
| 3 | Average of 12 monthly index values | 270.96975 | 270.970 (sum 3251.637) | Official worked example | US Bureau of Labor Statistics, Calculating percent changes (CPI factsheet) |
| 4 | Percentage change from 270.97 to 292.655 | 8.00273093 | 8.0 | Official worked example | US Bureau of Labor Statistics, Calculating percent changes (CPI factsheet) |
| 5 | Percentage change from 239.261 to 240.236 | 0.40750478 | 0.4 (ratio 0.004075) | Official worked example | US Bureau of Labor Statistics, Math calculations to better utilize CPI data (Perrins and Nilsen) |
| 6 | Percentage change from 237.805 to 240.236 | 1.02226614 | 1.0 (ratio 0.01022) | Official worked example | US Bureau of Labor Statistics, Math calculations to better utilize CPI data (Perrins and Nilsen) |
| 7 | Percentage change from 712.357 to 719.641 | 1.02252101 | 1.0 (ratio 0.01022) | Official worked example | US Bureau of Labor Statistics, Math calculations to better utilize CPI data (Perrins and Nilsen) |
| 8 | Percentage change from 112.5 to 121.5 | 8 | 8.0 (9 points) | Official worked example | US Bureau of Labor Statistics, CPI technical notes, Table 1 |
| 9 | Percentage change from 225 to 243 | 8 | 8.0 (18 points) | Official worked example | US Bureau of Labor Statistics, CPI technical notes, Table 1 |
| 10 | Percentage change from 110 to 128 | 16.36363636 | 16.4 (18 points) | Official worked example | US Bureau of Labor Statistics, CPI technical notes, Table 1 |
| 11 | Percentage change from 2,342 to 2,500 | 6.74637062 | 0.06746 / 6.75% | Official worked example | Microsoft Support, Calculate percentages (Excel) |
| 12 | Percentage change from 2,500 to 2,425 | -3 | -0.03000 / -3.00% | Official worked example | Microsoft Support, Calculate percentages (Excel) |
| 13 | 113 changed by 25% | 141.25 | $141.25 | Official worked example | Microsoft Support, Calculate percentages (Excel) |
| 14 | 113 changed by -25% | 84.75 | $84.75 | Official worked example | Microsoft Support, Calculate percentages (Excel) |
| 15 | Whole when 15 is 75% of it | 20 | $20.00 | Official worked example | Microsoft Support, Calculate percentages (Excel) |
| 16 | Original before a 20% change to 180 | 150 | n/a | Our constructed case | Ours |
| 17 | Original before a -30% change to 70 | 100 | n/a | Our constructed case | Ours |
| 18 | Quarterly change from 10,493.1 to 10,597.1 | 0.9911275 | 0.9911 (1.0 rounded) | Official worked example | US Bureau of Economic Analysis, FAQ: How is the percent change at an annual rate calculated? |
| 19 | Annual rate of a move from 10,493.1 to 10,597.1 in 1 of 4 periods a year | 4.02384045 | 4.0237 (4.0 rounded) | Official worked example | US Bureau of Economic Analysis, FAQ: How is the percent change at an annual rate calculated? |
| 20 | Growth rate per period, 2 to 4 over 3 periods | 0.2599210499 | 0.2599210499 | Official worked example | Google Docs Editors Help, RRI function |
| 21 | Growth rate per period, 10 to 3 over 10.5 periods | -0.1083343751 | -0.1083343751 | Official worked example | Google Docs Editors Help, RRI function |
| 22 | Growth rate per period, 10 to 0 over 1 period | -1 | -1 | Official worked example | Google Docs Editors Help, RRI function |
| 23 | Growth rate per period, 10,000 to 11,000 over 96 periods | 0.0009933074 | 0.0009933 | Official worked example | Microsoft Support, RRI function |
| 24 | Growth rate per period, 10,000 to 11,000 over 8 periods | 0.0119850241 | 0.012 / 1.2% (Microsoft's description) | Official worked example | Microsoft Support, RRI function |
| 25 | Point change from 10% to 9% | -1 | falls 1 percentage point to 9% | Official worked example | Office for National Statistics service manual, Percentages |
| 26 | 10 changed by -1% | 9.9 | a fall of 1% gives 9.9% | Official worked example | Office for National Statistics service manual, Percentages |
| 27 | 40,000 moved from an index of 218.056 to 195.3 | 35,825.65946362 | $35,826 | Official worked example | US Bureau of Labor Statistics, Math calculations to better utilize CPI data (Perrins and Nilsen) |
| 28 | 45,000 moved from an index of 237.017 to 195.3 | 37,079.61876152 | $37,080 | Official worked example | US Bureau of Labor Statistics, Math calculations to better utilize CPI data (Perrins and Nilsen) |
| 29 | Nominal and real change, 35,000 to 45,000, index 195.3 to 237.017 | nominal 28.571429%, real 5.941768% | nominal 'an increase of 29 percent'; real 'slightly less than 6 percent' | Official worked example | US Bureau of Labor Statistics, Math calculations to better utilize CPI data (Perrins and Nilsen) |
| 30 | Purchasing power, 232.957 as a share of 236.736 | 98.40370708 | 98.4% | Official worked example | US Bureau of Labor Statistics, Math calculations to better utilize CPI data (Perrins and Nilsen) |
| 31 | 500 moved from an index of 237.805 to 240.236 | 505.11133071 | $505.11 | Official worked example | US Bureau of Labor Statistics, Math calculations to better utilize CPI data (Perrins and Nilsen) |
| 32 | Percent difference between 10 and 6 | 50 | 50% | Calculator site example, used to check a convention | calculator.net percent calculator |
| 33 | Percentage change from -25 to 25 | 200 | 200% | Calculator site example, used to check a convention | CalculatorHub.com percentage change calculator (source checked 2026-11-21) |
| 34 | Percentage change from -10 to -25 | -150 | -150% | Calculator site example, used to check a convention | CalculatorHub.com percentage change calculator (source checked 2026-11-21) |
| 35 | Percentage change from 0 to 5 | Not defined; absolute change 5 | n/a | Our constructed case | Ours |
| 36 | Percentage change from 0 to 0 | 0 | n/a | Our constructed case | Ours |
| 37 | Percent difference between 5 and -5 | Not defined; size-based variant 200% | n/a | Our constructed case | Ours |
| 38 | Net effect of +10% then -10% | -1 | n/a | Our constructed case | Ours |
| 39 | Gain needed after a 50% loss | 100 | n/a | Our constructed case | Ours |
| 40 | Time saved and speed gained, 60 to 50 | time 16.666667%, speed 20% | n/a | Our constructed case | Ours |
| 41 | Percentage change from 0.1 to 0.3 | 200 | n/a | Our constructed case | Ours |
| 42 | Percentage change from 229.815 to 232.945 | 1.36196506 | 1.4 | Official worked example | US Bureau of Labor Statistics, CPI escalation factsheet |
| 43 | Percentage change from 180 to 190 | 5.55555556 | 5.6 | Official worked example | US Bureau of Labor Statistics, K-12 graphing inflation activity |
Where our engine and a source differ at the last digit, it is because the source rounded an intermediate step. The BEA, for example, rounds the quarterly GDP ratio before raising it to the fourth power, which moves the fourth decimal of the annual rate; the annualized change page shows both.
Sources and how often we check them
Software help pages (Microsoft and Google) are rechecked every six months, and statistics agency pages once a year. Outbound links are checked monthly. The build refuses to publish if a source is badly overdue. Changes are listed on the changelog.