Percentage Calculator
Six percentage calculations on one page, from a share of a total to the price before a tax, each with the arithmetic it used.
Overview
A percentage is a fraction out of a hundred. Every calculation here is the same step arranged differently: divide by a hundred and multiply to take a percentage, divide and multiply by a hundred to find one, or divide by the factor to undo one. The last is the one that goes wrong most often, and the one this page is most careful with.
Web interface
Find the line that reads like your question and fill in its two fields; the answer appears as you type, with the arithmetic under it. Copy next to an answer copies it. Decimals at the top applies to every line: Auto, the default, shows up to six decimal places, and 0, 1, 2, 3, 4 or 6 fixes the number. The arithmetic underneath is always shown to ten decimal places, so it reaches the answer even when the answer is rounded.
Calculations
| Line | Example | Working |
|---|---|---|
| What is X percent of Y? | 20% of 150 is 30 | 20 ÷ 100 = 0.2, then × 150 = 30 |
| X is what percent of Y? | 30 of 120 is 25% | 30 ÷ 120 = 0.25, then × 100 = 25 |
| X increased or decreased by Y percent | 80 plus 25% is 100 | 25% of 80 is 20, so 80 + 20 = 100 |
| The change from X to Y as a percentage | 100 to 125 is +25%, 125 to 100 is −20% | 100 − 125 = -25, then ÷ 125 × 100 = -20 (a fall of 25) |
| X is Y percent of what? | 50 is 25% of 200 | 25 ÷ 100 = 0.25, then 50 ÷ 0.25 = 200 |
| X is Y percent more or less than what? | 200 is 25% more than 160 | 25% added makes a factor of 1.25, then 200 ÷ 1.25 = 160 |
The last two work backwards, to the number you started from. A gross price of 119 with 19% tax has a net of
100: 19% added makes a factor of 1.19, then 119 ÷ 1.19 = 100. Taking 19% off 119 instead gives
96.39, which is wrong, because the tax was added to the net, not taken from the gross.
A change is measured against the size of its start, so from −50 to −25 is a rise of 50%. Some inputs have no answer, and the line says why:
| Message | When |
|---|---|
Enter numbers in both fields. | a field holds something that is not a number |
Nothing can be a percentage of zero. | X is what percent of 0 |
A change from zero has no percentage. | a change starting at 0 |
Zero percent has no total behind it. | X is 0 percent of what |
A fall of one hundred percent leaves zero, so there is no starting value to find. | X is 100 percent less than what |
Numbers and rounding
A single comma or point is the decimal separator, so 1,5 and 1.5 are the same.
Thousands can be grouped with spaces or apostrophes, and with dots or commas where they cannot be a decimal:
1.000.000, 1,000,000 and 1.234,5 are all read as you would expect, while
1.000 on its own is one. Answers carry no thousands separator, so a copied answer pastes into a
spreadsheet as a number.
Rounding follows the decimal figure, not its binary approximation. 0.5% of 3 is 0.015, and at two decimals it
shows as 0.02; JavaScript's own toFixed gives 0.01, because the stored value is
slightly below 0.015. Halves round away from zero, the same for negative numbers.
Common mistakes
- Percentage points are not percent. A rate that moves from 4% to 6% has risen by 2 percentage points, which is a rise of 50 percent.
- Percentages do not reverse. 100 plus 10% is 110, and 110 minus 10% is 99, because the second step is taken of a larger number.
- The order of a change matters. From 100 to 125 is a rise of 25%, from 125 to 100 a fall of 20%, since each is measured against its own start.
- Removing a tax or a markup is a division by the factor, not a subtraction of the rate, as the 119 above shows.
No API
There is no API for this tool. Every calculation is one line of arithmetic, run in the browser; the working under each answer is the formula to use anywhere else.
Privacy
Nothing leaves the browser. The numbers are worked out on the page and are not stored or sent, and Copy writes to the clipboard only when you press it.