Skip to main content

Discount Calculatorv1.0.0

Computes final sale price under any of ten discount structures, with optional double or triple stacking and a price-target back-solve mode. Structures include percent-off, fixed-amount, buy-X-get-Y, Nth-item, multi-buy (N for M), N-for-fixed-price, and bundle, all constrained by an optional discount cap, price floor, and sales tax that applies before or after the discount. Output covers final price, total savings, effective price per unit, and savings per unit.

Ecommerce
Retail
Shopping
Business
Reference

Documentation

Quickstart: Simply select a Discount type and click Load example to visualize how the calculator works. Placeholders provide basic explanations for inputs under each Discount Type.

Follow these steps to compute accurate totals and savings. The calculator applies each rule to the current subtotal, respects caps and floors, and handles tax as configured.

  • Select a Discount type (percent off, amount off, buy-X-get-Y, Nth-item, multi-buy, N for fixed price, bundle, double, triple, or price target).
  • Enter Base unit price and Item count, or switch to cart mode by adding products in the table.
  • Toggle Tax included and set the Sales tax rate. Choose whether to Apply discount before tax.
  • Set optional Discount cap (% or $) and Price floor (% of list or $ per unit).
  • Click Calculate to see subtotal, discount amount and percent, tax, total after tax, per-unit price, and deal details.

Use the following plain-text formulas and logic for quick reference:

  • Percent off: discounted_subtotal = subtotal × (1 − p), where p is percent/100.
  • Fixed amount off: discounted_subtotal = max(0, subtotal − A).
  • Buy X get Y (discount d% on Y): set_size = X + Y; eligible_sets = floor(Q / set_size); discounted_units = eligible_sets × Y; savings = sum_of_highest_prices_for(discounted_units) × d.
  • Nth-item percent off: sort all unit prices descending; apply percent r to every Nth item starting at index N; savings = sum(selected_unit_prices) × r.
  • Multi-buy (N for M): eligible_sets = floor(Q / N); free_units = eligible_sets × (N − M); savings = sum_of_highest_prices_for(free_units).
  • N for fixed price ($B): eligible_sets = floor(Q / N); bundled_total = eligible_sets × B; unbundled_qty = Q mod N; unbundled_total = sum_of_highest_prices_for(unbundled_qty); savings = (normal_total − (bundled_total + unbundled_total)).
  • Bundle (size S): eligible_sets = floor(Q / S); apply benefit as configured:
    • Percent off on entire bundle: savings = bundle_value × percent.
    • Percent off on cheapest or most expensive items within bundles: savings = sum(target_items) × percent.
    • Amount off: savings = amount × eligible_sets.
    • Fixed bundle price: savings = (bundle_list_total − fixed_price) × eligible_sets.
  • Double/Triple discount (sequential): apply each discount in order to the remaining subtotal, not additively. Example: after percent a% then amount $b then percent c%:
    step1 = subtotal × (1 − a); step2 = max(0, step1 − b); step3 = step2 × (1 − c).
  • Price target: required_discount = max(0, subtotal − target); required_percent = (required_discount ÷ subtotal) × 100.
  • Cap: max_savings_% = subtotal × cap%; max_savings_$ = cap_amount; savings = min(savings, cap).
  • Price floor:
    floor_%: min_price = subtotal × floor%; max_savings = subtotal − min_price;
    floor_$ per unit: max_savings = subtotal − (floor_per_unit × total_units);
    savings = min(savings, max_savings).
  • Tax:
    • Discount before tax: tax = discounted_subtotal × rate; total = discounted_subtotal + tax.
    • Tax included in prices: pre_tax = discounted_subtotal ÷ (1 + rate); tax = pre_tax × rate; total = discounted_subtotal.
  • Per-unit metrics: effective_price = discounted_subtotal ÷ total_units; savings_per_unit = (subtotal ÷ total_units) − effective_price.
  • Tie-breaking when prices vary: when deals specify free or discounted units, the calculator prioritizes higher-priced units first for customer-friendly savings.

Apply the calculator to compare promotions, plan purchases, and validate pricing rules across retail and ecommerce scenarios.

  • Compare a “25% off” coupon against “3 for 2” to find the lower effective unit price.
  • Evaluate “Buy 2, get 1 free” with mixed prices to see how savings change by item mix.
  • Fit a cart to a target subtotal (for free shipping or budget limits) and compute the required discount percent.
  • Enforce price floors or caps to simulate store policy and confirm compliant totals.
  • Include sales tax accurately and test “discount before tax” versus “tax-included” pricing.
  • Model bundle offers like “any 3 for $10” or “20% off the cheapest 3 in a set of 5.”
  • Stack sequential discounts to reflect loyalty, coupon, and clearance reductions in order.
Inputs, outputs, and what the Discount Calculator computes

The form above accepts the following inputs and produces the outputs listed below. This summary is rendered in the page so the parameters are visible to crawlers, assistive tech, and indexing agents that don't fetch the embedded tool frame.

Inputs

  • Discount type · default: % off
  • Tax included?
  • Sales tax rate (%) (text input)
  • Apply discount before tax
  • Allow decimal quantities
  • Base unit price (text input)
  • Item count (text input) · default: 1
  • Target subtotal (text input)
  • Percent off (text input)
  • Amount off (text input)
  • Buy quantity (X) (text input)
  • Get quantity (Y) (text input)
  • Discount on Y (text input)
  • Nth (text input)
  • Percent off on Nth (text input)
  • N for M pattern (text input)
  • Get N (text input)
  • Pay M (text input)
  • N (text input)
  • Bundle price (text input)
  • Bundle size (text input)
  • Bundle scope · default: Same SKU
  • Bundle benefit · default: Percent off
  • Benefit value (text input)
  • Apply to · default: Entire bundle
  • First discount · default: Percent
  • First discount value (text input)
  • Second discount · default: Percent
  • Second discount value (text input)
  • First discount · default: Percent
  • First discount value (text input)
  • Second discount · default: Percent
  • Second discount value (text input)
  • Third discount · default: Percent
  • Third discount value (text input)
  • Allow stacking with structured deals?
  • Discount cap · default: None
  • Discount cap value (text input)
  • Price floor · default: None
  • Price floor value (text input)
  • Product name or SKU (text input)
  • List unit price (text input)
  • Override unit price (text input)
  • Quantity (text input)

Controls

Calculate · Reset

Worked example

Quickstart: Simply select a Discount type and click Load example to visualize how the calculator works.