How the Percentage Calculator Works
The calculator offers eight modes built from the basic relation that a percentage is a part per hundred. “What is X% of Y” computes (X ÷ 100) × Y; “X is what % of Y” computes (X ÷ Y) × 100; percent change computes ((B − A) ÷ |A|) × 100; add and subtract a percent compute Y × (1 ± X ÷ 100); reverse percentage computes Y ÷ (X ÷ 100) to recover the original; and percentage-point change computes B − A. Each mode is a pure function in a shared, unit-tested engine and returns both the number and a worked-formula string.
- X% of Y = (X ÷ 100) × Y; X is what % of Y = (X ÷ Y) × 100
- Percent change = ((new − old) ÷ |old|) × 100
- Add/subtract: Y × (1 ± X ÷ 100); reverse: Y ÷ (X ÷ 100)
- Percentage-point change is the plain gap B − A
- All math is client-side JavaScript with no server round-trip
