Calculation methods
Every calculator uses a stated formula. Calculations run in your browser; entering a value does not send that number to a calculation server.
Precision and rounding
We use decimal arithmetic with 50 significant digits internally. Inputs are limited to 30 significant digits and absolute values from 10⁻²⁰ to 10³⁰, plus zero. Display precision can be set from 0 to 12 decimal places using the available presets. Rounding uses half-up: a tie rounds away from zero. Intermediate steps are not rounded to the display setting.
Very small and large results use scientific notation. A displayed step may contain an approximation; the next step uses the unrounded internal value. Ratio simplification uses integer arithmetic to produce exact reduced terms.
Definitions
Percent change uses a positive starting value as its denominator. Percentage difference uses the average of two nonnegative measurements. They answer different questions. A move from 5% to 6% is one percentage point and a 20% relative increase.
Undefined calculations
We do not substitute zero for division by zero. Negative baselines are rejected for percent change, and negative measurements are rejected for percent difference. Each calculator explains its own domain. A 100% discount cannot be reversed to a unique original price.
Validation
Automated tests cover worked examples, invalid input, zero denominators, signed inputs, successive discounts, decimal ratios and algebraic properties. These checks reduce errors but do not replace checking a result in its real context.
Verification examples
These cases are checked by the automated test suite against the same calculation code used by the site. Open the linked calculator, choose the listed mode and enter the inputs in the listed order. Set the display precision to the number shown; rejected cases must display an error rather than a numeric result.
| Case and calculator | Mode; inputs in order | Decimal places | Expected result |
|---|---|---|---|
| Zero percentage | Percentage of a number: 0; 240 | 6 | 0 |
| Percentage above 100% | What percent is A of B?: 120; 80 | 6 | 150% |
| Negative result | Percentage of a number: -25; 80 | 6 | -20 |
| Find the whole | Find the original whole: 15; 54 | 6 | 360 |
| Positive half-up rounding | Percentage of a number: 15; 1.5 | 2 | 0.23 |
| Negative half-up rounding | Percentage of a number: -15; 1.5 | 2 | -0.23 |
| Known salary increase | Increase by a percentage: 2400; 5 | 6 | 2520 |
| Change crossing zero | Old value → new value: 10; -5 | 6 | -150% |
| Symmetric difference | Compare two measurements: 48; 52 | 6 | 8% |
| Successive discounts | Two successive discounts: 200; 25; 10 | 6 | 135 |
| Decimal ratio | Simplify A : B: 1.5; 2.5 | 6 | 3 : 5 |
| Recipe scaling | Solve A / B = x / D: 200; 4; 6 | 6 | 300 |
| Zero whole | What percent is A of B?: 4; 0 | 6 | Rejected: zero denominator |
| Zero change baseline | Old value → new value: 0; 5 | 6 | Rejected: starting value must be positive |
| Both measurements zero | Compare two measurements: 0; 0 | 6 | Rejected: average is zero |
| Reverse 100% discount | Recover original price: 0; 100 | 6 | Rejected: no unique original price |
For the successive-discount case, the first price reduction is 50 and the second is 15. Total savings are 65, equivalent to 32.5% of the starting price. Passing these checks is evidence of the tested cases, not a guarantee for every use.
Content responsibility
Calcunora maintains the calculation code, explanations and examples. To report a discrepancy, email info@calcunora.com with the calculator, mode, input values, precision and expected result.
Formula references
For independent educational context: Math Is Fun: percentages and OpenStax: applications of percent. The explanations and examples on Calcunora are written for this project.
Last content update: .