How we calculate
Every calculator on PercentPad uses exact decimal arithmetic, rounds only the number you see, and shows the formula with your numbers. Nothing you type is sent anywhere: the math runs in your browser.
Exact decimal arithmetic
Ordinary computer math stores numbers in binary, which is why many calculators show 0.1 + 0.2 = 0.30000000000000004. We use decimal arithmetic instead, with 40 significant digits for divisions, so 7% of 0.1 is exactly 0.007.
Rounding
Results are rounded half up, and only for display. By default you see up to 4 decimal places with trailing zeros removed, or more when the number is very small. Choose a fixed number of decimal places in the ⋯ menu under any result. Money amounts in the tip calculator always show 2 decimals.
Numbers you can type
- Whole numbers and decimals: 20, 2.5, .75
- Percent and currency signs are ignored: 20%, $80, €15
- Thousands separators: 1,500 and 1.500,25 and Indian grouping such as 1,00,000
- A single comma, like 1,5, is read as a decimal unless it clearly groups thousands (1,500). If your browser uses a comma for decimals, a comma is always the decimal separator.
- Negative numbers with a minus sign; on phones, use the ± button next to the field.
Results are shown in your browser’s number format, including Indian grouping (12,34,567.89).
Formulas
| Calculation | Formula |
|---|---|
| Percent of a number | P ÷ 100 × X |
| What percent X is of Y | X ÷ Y × 100 |
| X is P% of what | X ÷ (P ÷ 100) |
| Percentage change | (new − old) ÷ |old| × 100 |
| Add or subtract a percentage | A × (1 ± P ÷ 100) |
| Percentage difference | |a − b| ÷ ((a + b) ÷ 2) × 100 |
| Reverse percentage | final ÷ (1 ± P ÷ 100) |
| Discount | price × (1 − P ÷ 100) |
| Average (weighted) | Σ(p × n) ÷ Σn |
| Marks percentage | Σ obtained ÷ Σ maximum × 100 |
| Percent error | |measured − true| ÷ |true| × 100 |
| Tip | bill × P ÷ 100 |
| Margin | (price − cost) ÷ price × 100 |
| Markup | (price − cost) ÷ cost × 100 |
| Fraction to percent | numerator ÷ denominator × 100 |
| Percent to fraction | P ÷ 100, simplified by the greatest common divisor |
Edge cases
- Dividing by zero shows a message instead of a number, for example a percentage change from 0.
- A margin of 100% or more is impossible for a real cost, so the calculator explains why.
- Percentage changes use the absolute value of the starting number, so negative bases keep a meaningful sign.
Testing
Every calculator is covered by automated tests that check results against known values, number formats and edge cases before each release.
Corrections
Found something wrong? Please tell us, with the page and the numbers you typed (the Copy link option in the ⋯ menu captures both).
Updated October 2026