Calculator

Discount percentage calculator.

Find a sale price from a percentage, the percentage from two prices, or the deepest markdown that still keeps your margin. Shopify mode rounds and stacks discounts the way Shopify's checkout does.

Shopify discount rules checked
What do you want to work out?
The item

What one unit costs you. Needed to keep a margin.

The discount
Shopify mode

Shopify's rounding and combining rules, tax, the compare-at price and your margin with Shopify's fees.

Your discount

20% off $50.00 is $40.00. You save $10.00.

Sale price

$40.00

You save

$10.00

Percent off

20%

Order total, 1 unit

$40.00

Price, $50.00
$50.00
20% off
-$10.00
Sale total
$40.00
  • Add your item cost to see the margin left after the discount.

The mode and numbers you enter are written into the page address, so a shared link opens the same discount.

How to work out a discount.

The four sums the calculator does, with the numbers worked through.

  1. Percent off to a sale price

    Take the percentage off the price: sale price = price x (1 - percent / 100). 20% off $50.00 is $40.00, a saving of $10.00. The sale price is rounded to the nearest cent, then multiplied by the number of units.

  2. Two prices to a percent off

    Divide the saving by the original price: percent off = (original - sale) / original x 100. $80.00 down to $60.00 saves $20.00, which is 25% off.

  3. Keep a margin

    The lowest price that keeps a margin is the item cost divided by (1 - margin). An item that costs $15.00 keeps a 40% margin down to $25.00, so from $50.00 you can take up to $25.00 off, or 50%.

  4. Deals and stacks

    Buy X get Y spreads the free or cheaper items over everything in the deal: buy 2 get 1 free is 33.33% off. Two percentages one after the other multiply rather than add: 20% then 10% is 28% off.

Why a markdown costs more margin than it looks.

Your cost does not fall when the price does, so every dollar off comes straight out of profit. A $50.00 item that costs $15.00 keeps 70.0% of its price at full price, 62.5% at 20% off and 40.0% at 50% off.

Margin here is before payment fees: the price less the item cost, as a share of the price. Card processing, Shopify's transaction fee and shipping come off as well. In Shopify mode the calculator links to the fee calculator with your sale price filled in, so you can see what the sale leaves after every fee.

A markdown changes the price itself, which in Shopify means a lower price with the original kept as the compare-at price. A discount code or automatic discount leaves the price alone and takes the saving off at checkout. The math is the same; where the customer sees it is not.

Shopify discount calculator

How Shopify works out a discount.

  1. Product discounts first, then order discounts

    Product discounts apply first, to individual items. Order discounts apply to the revised subtotal after product discounts. Shipping discounts apply last. Discounts only combine when each one's settings allow the other's class.

  2. Percentages are worked per unit and rounded down

    A Shopify staff answer describes the rule: the discount on each unit is rounded down to the cent, then the discounted price is multiplied by the quantity. 10% off two at $46.99 takes $4.69 off each and comes to $84.60; the older whole-line method gave $84.59. Shopify rolled the change out to every store in early 2026 without a changelog note, and the Help Center states no rounding rule.

  3. Two order percentages add up

    Each percentage order discount works on the same subtotal, so 10% and 15% on $350.00 take 25% off and leave $262.50. With a percentage and a fixed amount, the percentage goes first: 10% off $350.00 leaves $315.00, then $20.00 off leaves $295.00.

  4. Tax comes after the discount

    On prices without tax, Shopify takes the discount off the subtotal and works the tax on what is left. On prices that include tax, Shopify does not say how it treats a discount, so the calculator labels that result an estimate.

Data and assumptions.

Checked
  • Shopify's discount rules were checked against its Help Center, shopify.dev and staff answers on its forums on October 23, 2026. Rules that only a staff answer states are labelled that way on the page.
  • Outside Shopify mode, the sale price per unit is rounded to the nearest cent and multiplied by the quantity. In Shopify mode, a percentage comes off each unit rounded down to the cent, as the staff answer describes; Shopify publishes no rounding for order discounts, so those are rounded to the nearest cent.
  • A fixed amount off the whole order is spread across the items in proportion to their prices. Shopify's own example splits $50.00 off a $50.00 item and a $100.00 item as $16.50 and $33.50, which is not an exact proportional split ($16.67 and $33.33), and Shopify does not explain the difference. The order total is the same either way, so the calculator gives order totals and treats any per-item split as approximate.
  • Tax on prices without tax is worked on the discounted subtotal, as Shopify states. Shopify rounds tax per line item, so a cart with several lines can differ from these figures by a cent.
  • On prices that include tax, Shopify does not describe how a discount is treated. The calculator backs the tax out of the discounted price with Shopify's own tax-included formula and labels the result an estimate.
  • Buy X get Y assumes every item has the same price. With mixed prices Shopify gives the discount to the lowest-priced qualifying items, as a Shopify staff answer describes; the Help Center does not state an order.
  • $0 or 0% discounts might not work correctly at checkout; use at least $0.01 or 1%.
  • Margin is before payment fees and shipping. The fee calculator adds those.

Questions about discounts.

How do I calculate a discount percentage?

Take the sale price away from the original price, divide by the original price and multiply by 100. $80.00 down to $60.00 is $20.00 off, and $20.00 divided by $80.00 is 25%. Pick "Sale price to percent" above to do it for any two prices.

How do I work out a sale price from a percentage?

Multiply the price by one minus the percentage: $50.00 x (1 - 0.20) = $40.00. The calculator rounds the sale price to the nearest cent, or in Shopify mode takes the discount the way Shopify's checkout does, rounded down per unit.

How much does a markdown cut my margin?

More than the percentage suggests, because the cost stays the same while the price falls. An item at $50.00 that costs $15.00 has a 70.0% margin. At 20% off the margin is 62.5%; at 50% off it is 40.0%. Payment fees come off on top of that, which the fee calculator shows.

Do two discounts add up?

Applied one after the other, no: 20% and then 10% is 28% off, because the second works on the lower price. Shopify is different for two percentage order discounts: each works on the same subtotal, so they add up (10% and 15% on $350.00 leave $262.50).

How does Shopify round a percentage discount?

Per unit, rounded down to the cent, according to a Shopify staff answer on its developer forum: 50% off $10.99 is 549.5 cents, rounded down to $5.49, so six cost $33.00 rather than the $32.97 that whole-line math gives. The Help Center itself states no rounding rule.

Is buy 2 get 1 free the same as 33% off?

Over the three items, yes: you pay for two and get three, which is 33.33% off. But the customer has to buy all three to get it, and in Shopify they must add the free item to the cart themselves; it is never added for them.

See what the sale leaves after fees.

Run the sale price through the fee calculator for the card fee, Shopify's transaction fee and the profit on every plan.