Color swatch generator
Turn hex codes, a pasted list or a product photo into a matching set of color swatches.
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.
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
The mode and numbers you enter are written into the page address, so a shared link opens the same discount.
The four sums the calculator does, with the numbers worked through.
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.
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.
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%.
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.
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
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.
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.
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.
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.
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.
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.
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.
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).
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.
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.
Run the sale price through the fee calculator for the card fee, Shopify's transaction fee and the profit on every plan.