Percentages.
Four modes: X% of Y, X is what % of Y, increases, discounts and percent change.
A percentage calculator covering the 4 real-life questions: "what's 15% of 12,300?", "700 is what percent of 2,500?", "what's the price with 30% off?" and "how much did it go up from 100 to 165?". No mental math, no sign errors.
- Mode 1: X% of Y
- Mode 2: X is what % of Y
- Mode 3: Increase or discount of X% over Y
- Mode 4: Percent change between two values
- Accepts decimals with comma or period
- Both rounded and exact result shown
- 01Compute sales tax on a total
- 02Find the final price after a discount
- 03Compare month-over-month inflation
- 04Tip and commission calculations
- 05Salary adjustments and raises
porcentaje.util.ar
We're finishing this one. Landing will live at porcentaje.util.ar.
How is percent increase calculated?
Going from 100 to 165, increase = (165 − 100) / 100 × 100 = 65%. Going down gives a negative (discount).
What about discount?
We take the base, subtract X% of it, and show the final amount. E.g. $1,000 with 30% off → $700 (you save $300).
Comma or period for decimals?
Both work. Internally normalized to a period before calculating.
Why does 0.1 + 0.2 sometimes not equal 0.3?
Binary float representation in JavaScript. We round to 4 decimals to avoid the classic 0.30000000000000004 noise.