Free tool · margin, markup and price for Shopify sellers
Margin calculator: profit margin, markup and selling price
Enter a cost and a selling price to get the profit margin, markup and profit, or enter a target margin or markup to get the price. Add your Shopify payment fee to see the margin you keep after fees.
Free, no sign-up, any currency.
Updated
Selling price $15.00
- Markup
- $5.00 ÷ $10.00 cost = 50%
- Margin
- $5.00 ÷ $15.00 price = 33.3%
Profit margin is profit divided by the selling price; markup is profit divided by the cost. A product that costs $6.12 and sells for $13.99 makes $7.87 of profit: a 56.3% margin and a 128.6% markup. To get the price for a target margin, divide the cost by (1 − margin): $6.12 ÷ (1 − 0.55) = $13.60.
Margin, markup and selling price calculator
Pick what you want to find, enter what one unit costs you, then a price, a target margin or a markup. The results update as you type; decimals work with a point or a comma.
2.9% + 30¢ is the standard Shopify Payments rate for online card payments on the US Basic plan; the fixed part is charged once per order. Set both fees to 0 to leave them out. The currency symbol changes the display only.
Margin
56.3%
Margin = ($13.99 − $6.12) ÷ $13.99 = 56.3%
- Selling price
- $13.99
- Cost
- $6.12
- Profit
- $7.87
- Margin
- 56.3%
- Markup
- 128.6%
After payment fees
- Payment fee
- $0.71
- Profit after fees
- $7.16
- Margin after fees
- 51.2%
- Price for a target margin after fees
- —
Sell on Shopify? Costory does this for every product and keeps it updated as your costs change. Install free
| Mode | You enter | Price | Profit | Margin | Markup | Margin after fees |
|---|---|---|---|---|---|---|
| Margin from price | Price $13.99 | $13.99 | $7.87 | 56.3% | 128.6% | 51.2% |
| Price from margin | Target margin 55% | $13.60 | $7.48 | 55% | 122.2% | 49.9% |
| Price from markup | Markup 100% | $12.24 | $6.12 | 50% | 100% | 44.6% |
The $6.12 cost is a Brownie box: $5.32 of ingredients (200 g dark chocolate, 150 g butter, 180 g sugar, 3 eggs) and a $0.80 gift box. To work out a unit cost from a recipe or a bill of materials, use the recipe cost calculator or the product cost calculator.
Markup vs margin: what’s the difference?
Margin is profit as a share of the selling price, and markup is profit as a share of the cost. Both describe the same profit, so they are two views of one price, not two different prices.
Take an item that costs $10.00 and sells for $15.00. The profit is $5.00. As a markup that is $5.00 ÷ $10.00 = 50%; as a margin it is $5.00 ÷ $15.00 = 33.3%.
Markup is handy when you build a price up from the cost. Margin tells you how much of every dollar of sales you keep, which is why reports use it: Shopify shows a product’s margin as (price − cost per item) ÷ price, and its profit reports compute gross margin the same way from net sales.
For any price above cost, the margin is the smaller of the two numbers, and it can’t reach 100%. Markup has no ceiling: a $2.00 cost sold at $10.00 is a 400% markup and an 80% margin.
| Figure | Formula | $10.00 cost, $15.00 price |
|---|---|---|
| Profit | price − cost | $5.00 |
| Markup | profit ÷ cost | 50% |
| Margin | profit ÷ price | 33.3% |
Why is a 50% markup only a 33.3% margin?
A 50% markup is a 33.3% margin because markup divides the profit by the cost, while margin divides the same profit by the larger selling price. On a $10.00 cost, a 50% markup adds $5.00, and $5.00 out of a $15.00 price is 33.3%.
margin = markup ÷ (1 + markup) = 0.5 ÷ 1.5 = 0.333
Going the other way, a 50% margin needs a 100% markup: the price has to double the cost.
markup = margin ÷ (1 − margin) = 0.5 ÷ 0.5 = 1.0
Mixing the two up is an expensive mistake. A seller who wants a 50% margin and prices at cost × 1.5 sells a $10.00 item for $15.00 instead of $20.00: $5.00 less on every sale, and a 33.3% margin instead of 50%. The same slip on the Brownie box: a 55% markup on $6.12 gives $9.49 and a 35.5% margin, while a 55% margin needs $13.60.
Markup to margin conversion chart, 10% to 80%
Read each percentage once as a markup and once as a margin. The prices are for an item that costs $10.00, so you can see how far apart the two readings land.
| Percent | Margin from this markup | Price with this markup | Markup for this margin | Price at this margin |
|---|---|---|---|---|
| 10% | 9.1% | $11.00 | 11.1% | $11.11 |
| 20% | 16.7% | $12.00 | 25% | $12.50 |
| 25% | 20% | $12.50 | 33.3% | $13.33 |
| 30% | 23.1% | $13.00 | 42.9% | $14.29 |
| 40% | 28.6% | $14.00 | 66.7% | $16.67 |
| 50% | 33.3% | $15.00 | 100% | $20.00 |
| 60% | 37.5% | $16.00 | 150% | $25.00 |
| 70% | 41.2% | $17.00 | 233.3% | $33.33 |
| 75% | 42.9% | $17.50 | 300% | $40.00 |
| 80% | 44.4% | $18.00 | 400% | $50.00 |
Margin and markup formulas
profit = price − cost
margin = (price − cost) ÷ price
markup = (price − cost) ÷ cost
price for a target margin = cost ÷ (1 − margin)
price for a markup = cost × (1 + markup)
Gross margin over a month
Gross margin is the same formula applied to a period: (revenue − cost of goods sold) ÷ revenue. Sell 100 Brownie boxes at $13.99 and the revenue is $1,399.00; at $6.12 each, the cost of goods sold (COGS) is $612.00, the gross profit $787.00 and the gross margin 56.3%.
Gross margin is only as right as the costs behind it. Shopify’s profit reports count profit only for products that had a Cost per item when they sold; the Shopify COGS page explains how to fill it from real recipes.
How do .99 price endings change your margin?
Rounding a price up to an ending like .99 adds a little margin, and rounding it down takes margin away. The table rounds the 55% margin price of the $6.12 Brownie box, $13.60.
| Rounding | Price | Profit | Margin | In a Costory price rule |
|---|---|---|---|---|
| No rounding | $13.60 | $7.48 | 55% | margin(cost, 55%) |
| Up to .95 | $13.95 | $7.83 | 56.1% | ending(…, 0.95) |
| Up to .99 | $13.99 | $7.87 | 56.3% | ending(…, 0.99) |
| Up to a whole dollar | $14.00 | $7.88 | 56.3% | ceil(…, 1) |
| Down to $13.49 | $13.49 | $7.37 | 54.6% | a fixed price |
To keep at least your target margin, round up: take the smallest price with your ending that is not below the calculated price. The calculator’s “Round the price” setting works that way, and so does the ending function in Costory’s price rules, where ending(margin(cost, 55%), 0.99) turns $13.60 into $13.99.
Rounding weighs more on cheap items. Moving a $4.20 price to $4.99 adds $0.79, about 18.8% of the price; moving $42.20 to $42.99 adds the same $0.79, under 2%.
How do Shopify payment fees affect your margin?
Every card payment through Shopify Payments costs a percentage of the payment plus a fixed amount, so the margin you keep is lower than the margin on the price tag. On a $13.99 sale with a $6.12 cost, the fee takes the margin from 56.3% to 51.2%.
| Shopify plan | Card rate | Fee | Margin after fees |
|---|---|---|---|
| Basic | 2.9% + 30¢ | $0.71 | 51.2% |
| Grow | 2.7% + 30¢ | $0.68 | 51.4% |
| Advanced | 2.5% + 30¢ | $0.65 | 51.6% |
| Order | Fee | Share of the price |
|---|---|---|
| $7.99 | $0.53 | 6.7% |
| $13.99 | $0.71 | 5% |
| $49.99 | $1.75 | 3.5% |
The rates are the standard ones Shopify publishes for online card payments in the US (Shopify, October 2026). Premium and international cards cost more, and rates differ by country, so check your own rate in your Shopify admin’s payment settings. With another payment provider, Shopify adds a transaction fee of 2% on Basic, 1% on Grow, 0.6% on Advanced and 0.2% on Plus, on top of the provider’s own fee (Shopify pricing).
To keep a target margin after fees, add the fixed fee to the cost and take the fee percentage off along with the margin:
price = (cost + fixed fee) ÷ (1 − margin − fee %) = ($6.12 + $0.30) ÷ (1 − 0.55 − 0.029) = $15.25
Two limits to keep in mind. The fixed part is charged once per order, so on a three-item order each item carries 10¢ of it; the calculator assumes one item per order, the cautious case. And the percentage applies to the whole payment, shipping and tax included, while the calculator applies it to the item price.
Keep every Shopify price at your target margin
A calculator answers for one product at one cost; Costory, a Shopify app, does the same math for every product and does it again when a cost changes. It calculates each product’s cost from its recipe and writes it to Shopify’s Cost per item, so Shopify’s own profit reports use real costs.
Then a price rule turns that cost into a price. With ending(margin(cost, 55%), 0.99) the Brownie box costs $6.12 and sells for $13.99, a 56.3% margin. When dark chocolate goes from $14 to $16 per kg, the cost becomes $6.52 and the rule proposes $14.99, a 56.5% margin.
What Costory adds to the math
- Unit cost from the recipe: ingredients with units and waste, packaging, labor and overhead.
- Price rules by markup, margin, cost plus or tiered margin, with .99 endings, a minimum price and a minimum margin guard.
- Price proposals with the margin before and after, applied in one batch (Starter and up).
- Every price change in History with its reason and a one-click rollback.
The Free plan covers recipes and costs for up to 10 products and one price rule you apply by hand on the product page. Proposals and automatic mode start on Starter at $12.99 a month, with a 14-day trial. See all plans.
Margin and markup questions
How do I calculate profit margin?
Profit margin = (price − cost) ÷ price × 100. A product that costs $6.12 and sells for $13.99 makes $7.87 of profit, so its margin is $7.87 ÷ $13.99 = 56.3%. Use the full cost of one unit, packaging included, and the price before sales tax.
How do I find the selling price for a target margin?
Divide the cost by (1 − target margin). For a 55% margin on a $6.12 cost: $6.12 ÷ (1 − 0.55) = $13.60. Multiplying the cost by 1.55 instead gives a 55% markup, a $9.49 price and only a 35.5% margin.
What costs should I include when I calculate margin?
Everything one sold unit costs you: the product or its ingredients and materials (plus what you lose to waste), packaging, and labor per unit if you pay for it. Leave out sales tax, and add shipping only when you pay it and don’t charge it to the customer. The Brownie box in the calculator costs $5.32 of ingredients plus a $0.80 gift box, $6.12 in all.
Should I calculate margin with or without sales tax or VAT?
Without. Tax is collected for the government, so it is neither revenue nor profit. In the US, sales tax is added on top of the price at checkout, so your product price already leaves it out. If your prices include VAT, take it out first: a £12.00 price with 20% VAT is £12.00 ÷ 1.20 = £10.00 before VAT, and £10.00 is the price to enter.
How much does a discount cut my margin?
More than it seems, because the whole discount comes out of profit. A 10% discount takes $1.40 off the $13.99 Brownie box and the same $1.40 off its $7.87 profit: profit falls 17.8% to $6.47, and the margin falls from 56.3% to 51.4%. At a 30% margin, the same 10% discount takes away a third of the profit.
Why doesn’t my margin match Shopify’s profit report?
Shopify’s gross profit reports divide (net sales − cost) by net sales, and net sales already take off the discounts and refunds of the period, while the margin on a price tag assumes the full price. The reports also count profit only for products that had a cost recorded when they sold, so sales from before you filled in Cost per item are left out. Filling in Cost per item for every product closes the second gap; the first is what discounts and refunds cost you.
Can Costory keep my Shopify prices at a target margin?
Yes. Costory calculates each product’s cost from its recipe, writes it to Shopify’s Cost per item, and sets prices with rules such as ending(margin(cost, 55%), 0.99). The Free plan covers up to 10 products and one rule you apply by hand on the product page; price proposals and automatic mode start on Starter at $12.99 a month.
Related
Product cost calculator
Cost per unit from materials, waste, packaging, labor and overhead, plus a price that keeps your margin after payment fees.
Open the calculator →Margin-based pricing
Price rules that set Shopify prices from cost by markup, margin, cost plus or tiers, with rounding and margin guards.
Learn more →Recipe cost calculator
Cost a recipe from pack prices in g, oz, lb or ml: batch cost, cost per item or serving, and a price from your margin, with cake, cookie, candle and soap examples.
Open the calculator →Put your target margin on every Shopify product.
Free for up to 10 products. Paid plans start with a 14-day trial.
Install free on Shopify