Calculate a discounted sale price from an original price and a percent-off value, and see the absolute savings.
How it works
Savings equal price Ă— percentOff / 100, rounded to two decimal places. The final price is the original price minus savings, also rounded to cents. Percentages must fall between 0 and 100 inclusive; negative prices are rejected.
When to use it
- Check a storefront promo before checkout
- Compare “20% off” versus a fixed coupon amount elsewhere
- Explain markdown math in teaching or retail planning notes
Limitations
Tax, shipping, stacked coupons, and currency conversion are not modeled. Rounding uses standard half-up to two decimals and may differ from a particular POS system’s banker’s rounding. Results are illustrative only.
Example
Price 100 with 20 percent off yields final price 80 and savings 20. Price 19.99 with 15 percent off yields savings 3 and final price 16.99.