Discount Calculator Widget
Add a discount calculator to your store, deals blog or coupon page. Shoppers enter a price and a percentage off, add an extra stacked discount or sales tax if needed, and see the final price and exactly how much they save.
Live preview
Exactly what your visitors will seeUnder the widget on your page: Powered by A2Z Tools
Embed code
<iframe src="https://a2z.tools/embed/w/discount-calculator" title="Discount Calculator by A2Z Tools" width="100%" height="490" style="border:0;width:100%" loading="lazy" allow="clipboard-write"></iframe>
A plain iframe. Works everywhere, including site builders that strip scripts. Adjust height if your content needs more room.
<div data-a2z-widget="discount-calculator" data-height="490"></div> <script async src="https://a2z.tools/embed.js"></script>
Adds a small script (what it does) that sizes the widget to fit its content, loads it lazily and keeps it isolated from your page's CSS.
Works with
How it works
The first discount is taken off the original price, as on the A2Z Discount Calculator. An optional second discount is then applied to the already reduced price, which is how "an extra 10% off sale prices" works at the till - so 20% plus 10% comes to 28% off, not 30%, and the widget says so. Optional sales tax is charged on the discounted price, and the total discount is shown as a single percentage.
Calculation method
- Price after discount = price x (1 - d1 / 100)
- Stacked: final = price x (1 - d1 / 100) x (1 - d2 / 100)
- Total discount % = (price - final) / price x 100
- With tax: total = final x (1 + tax / 100)
Worked examples
Stacked sale discount
Inputs: Price 120; 20% off; extra 10% off the sale price; no tax
Result: Final price 86.40; after first discount 96.00; you save 33.60; total discount 28%
0.8 x 0.9 = 0.72 of the price.
Discount then sales tax
Inputs: Price 80; 25% off; sales tax 8.25%
Result: Price before tax 60.00; tax 4.95; final price incl. tax 64.95
Tax is charged on the reduced price.
Limitations
- No multi-buy, bundle, loyalty-point or cashback offers; convert them to an equivalent percentage first.
- Coupons that are a fixed amount off (for example 10 off 50) are not a separate mode; work out the percentage and enter that.
- Tax is applied to the discounted price; some places tax manufacturer coupons on the pre-coupon price, which the widget does not model.
- Money is displayed to the cent; the widget does not reproduce till rounding, which some shops apply per item.
Where publishers use it
- Coupon and deal sites showing what a code is really worth on a sample price
- Retail store pages explaining an "extra % off already reduced items" promotion
- Black Friday and seasonal-sale articles where discounts stack
- Maths lessons on successive percentage decreases
- Outlet and clearance pages where a markdown is taken off an already reduced compare-at price
- Student-discount, trade-account and staff-discount pages showing the net price on a sample basket
Questions
Are two discounts added together?
No. The second percentage is taken off the already reduced price. 20% off and then 10% off leaves 72% of the price, a 28% total discount.
Is tax charged before or after the discount?
After. The widget adds sales tax to the discounted price, which is how sales tax is normally charged on a reduced item. Coupon rules vary by place, so check local rules for manufacturer coupons.
Can I set the discount for my own promotion?
Yes. Preset v_discount (and v_extra for a stacked discount) in the builder so the widget opens with your offer.
Does it round?
Amounts are shown to the cent; the calculation itself is not rounded until display.
What does 'buy one, get one half price' come to as a percentage?
Two items at 100 cost 150 instead of 200, a 25% discount on the pair. Enter the pair's price and 25% to see the saving; the widget does not model multi-buy offers directly.
How do I find the original price from a sale price?
Divide by (1 - discount). A tag of 60 after 25% off started at 60 / 0.75 = 80. Check it by entering 80 and 25% in the widget.
Why does a 25% markdown need a 33.33% rise to undo it?
The rise is measured from the lower price. 80 marked down 25% is 60, and 60 must rise by 20, which is 33.33% of 60, to get back to 80 - a point worth knowing when a clearance price is later restored.
What does 'up to 70% off' tell me?
Only the deepest markdown on some items. Put the discount on the specific product you want into the widget; the average saving across a sale is usually far lower than the headline figure.
Is 'an extra 10% off' the same as '10 percentage points more'?
No. 20% off plus an extra 10% off is 28% in total, while a discount raised from 20% to 30% (ten percentage points) takes 2 more off every 100. Retail signs almost always mean the first.
Is a percentage discount better than cash back or a gift card?
A 20% discount on 120 saves 24 now. Twenty percent back as store credit is worth less unless you would spend it anyway, and cashback often arrives weeks later and may expire - compare them as money in hand.
Cite or recommend this tool
If you reference this tool in an article, course or documentation, these formats are ready to copy. They are optional - nothing is added to your site unless you paste it.
A2Z Tools Discount Calculator https://a2z.tools/discount-calculator
<a href="https://a2z.tools/discount-calculator">A2Z Tools Discount Calculator</a>
[A2Z Tools Discount Calculator](https://a2z.tools/discount-calculator)
Discount Calculator by A2Z Tools - https://a2z.tools/discount-calculator
Related widgets
-
US-style sales tax from the state and local rates you enter, or the tax hidden in a tax-inclusive total.
-
Profit, gross margin and markup from cost and price - or the price for a target margin.
-
Selling price from cost plus markup, or work back to the cost or the markup you applied.
-
Tip, total and each person's share of a bill, with an option to round shares up.
-
Units and revenue needed to cover fixed costs, plus the sales needed for a profit target.
-
Add or remove Indian GST at the rate you choose, split into CGST + SGST or IGST.