HomeFinance › Discount Calculator

Discount Calculator

Computes the final price and amount saved after a percentage discount, an optional second discount applied to the reduced price, and optional sales tax on the result.

When to use

You want the sale price after a percent-off promotion, the effective rate of two stacked discounts (e.g. 20 % off plus an extra 10 %), or the checkout price with tax.

Do not use when: You know the original and sale prices and need the percentage off (use percentage-change), or the discount is a fixed amount rather than a percent (just subtract it).

Formula

final_price = original_price × (1 − discount_percent/100) × (1 − second_discount_percent/100); amount_saved = original_price − final_price; effective_discount = amount_saved / original_price × 100; final_price_with_tax = final_price × (1 + tax_percent/100)

Inputs

ParameterTypeUnitRequiredDescription
original_pricenumberyesList price before any discount. Range: ≥ 0, ≤ 1000000000
discount_percentnumber%yesFirst percentage off the original price. Range: ≥ 0, ≤ 100
second_discount_percentnumber%default 0Optional extra percent off applied to the already-discounted price (stacked, not added). Range: ≥ 0, ≤ 100
tax_percentnumber%default 0Optional sales tax or VAT applied to the final discounted price. Range: ≥ 0, ≤ 100

Outputs

OutputTypeUnitDescription
final_pricenumberPrice after all discounts, before tax.
amount_savednumberoriginal_price − final_price.
effective_discount_percentnumber%Combined percentage off the original price.
price_after_first_discountnumberoriginal_price × (1 − discount_percent/100).
final_price_with_taxnumberfinal_price × (1 + tax_percent/100).

Example

80 at 25 % off: {"original_price":80,"discount_percent":25}{"final_price":60,"amount_saved":20,"effective_discount_percent":25,"final_price_with_tax":60}

200 at 20 % off plus extra 10 %, 8 % tax: {"original_price":200,"discount_percent":20,"second_discount_percent":10,"tax_percent":8}{"final_price":144,"amount_saved":56,"effective_discount_percent":28,"price_after_first_discount":160,"final_price_with_tax":155.52}

GET https://tttkmbb.com/api/v1/calculate/discount?original_price=80&discount_percent=25

Machine access

Sources

FAQ

Is 20 % off plus 10 % off the same as 30 % off?

No. The second discount applies to the reduced price, so the combined discount is 1 − 0.8 × 0.9 = 28 %, not 30 %.

Is tax charged on the discounted price?

In most jurisdictions store discounts reduce the taxable amount, so tax is applied to final_price; manufacturer coupons are sometimes taxed on the pre-coupon price.

Related calculators