Discount Calculator
Calculate sale prices and savings from percentage discounts. Perfect for shopping, sales planning, and comparing deals.
Discount Formula
| Calculation | Formula | Discount amountOriginal × (Discount% / 100) Sale priceOriginal - Discount amount Sale price (direct)Original × (1 - Discount% / 100)
Discount Examples
OriginalDiscountYou SaveFinal Price $10020%$20$80 $5030%$15$35 $20050%$100$100 | $75 | 15% | $11.25 | $63.75 |
Implementation
``javascript
function calculateDiscount(originalPrice, discountPercent) {
const discountAmount = originalPrice * (discountPercent / 100);
const salePrice = originalPrice - discountAmount;
return { discountAmount, salePrice };
}
``
Stacking Discounts
Multiple discounts are applied sequentially, not added. A 20% discount followed by 10% off is not 30% total—it's 28% (100 × 0.80 × 0.90 = 72, so 28% off).