The math
Calculate margin and markup
For one sale, take the cost away from the price. What is left is your profit. Then divide the profit by the price or by the cost:
Shopify's margin and markup explanation uses these two bases too. Count the same costs each time you compare results.
Same profit, two percentages
One sale, two percentages
In this illustrative example, an item costs $36.00 and sells for $60.00. Profit after that included cost is $24.00.
The item has a 40% margin and a 66.67% markup. Markup is higher because the cost is smaller than the selling price. This is true for any sale with a profit. Enter your own revenue and costs in the Profit Margin Calculator.

Targets
Set a price for a target margin
Adding your target margin to the cost is the markup trap: it gives a markup, not a margin. To find a price from a margin target, rearrange the margin equation:
- With $36 cost and a 40% margin target, price = $36 ÷ 0.60 = $60.00.
Adding 40% to cost instead gives $50.40, with only 28.57% margin.
Use the Product Pricing Calculator for a target-based estimate. It rounds the price upward to the next cent so cent rounding does not lower the achieved margin below the target. Your target is an input, not a recommended margin or a prediction of customer demand.

Convert
Convert markup to margin and back
The markup to margin formula and its reverse come from the same profit formulas. They work for any positive cost and price. Enter percentage numbers such as 40, rather than 0.40:
| Margin | Equivalent markup |
|---|---|
| 25.00% | 33.33% |
| 40.00% | 66.67% |
| 50.00% | 100.00% |
The table rounds percentages to two decimal places. Reusing a rounded percentage can slightly change a price; use the original cost and target margin for pricing.
The mix-up costs the most in four places. You set a wholesale price. You price handmade work. You plan a discount with a margin floor. Or you work back to the most you can pay a supplier. Each of those calculators asks which one you mean.
Before you start
What costs belong in the calculation?
The answer depends on what you want to measure. If you count only what the product cost you, the result is your gross profit. Each extra cost you add lowers the result. Shopify's profit reports use the product cost to work out gross margin.
A calculator cannot guess the costs you leave out, such as fees, shipping, returns, ads, rent or taxes. See a list of costs to count on the Profit Margin Calculator page. For rent and other fixed costs, read the contribution margin and break-even calculator.
Use numbers for the same item or the same month. A result after only some costs is not your net profit. Some fees are a percent of the price. These tools do not add them for you.
Limits
Zero values and losses
With zero cost and some revenue, margin is 100%. Markup is undefined, because you cannot divide by zero. With zero revenue, margin is undefined, so our margin calculator needs revenue above zero. If included cost is more than revenue, profit, margin and markup are all negative.
A 100% margin target gives no price when the cost is above zero. Our pricing calculator takes targets up to 99.99% and amounts up to $1 billion. The unit cost must be above zero.
Check the assumptions next to your results. For how we check formulas and sources, read our editorial policy.
Questions
Margin vs markup: quick questions
- Is a 50% markup the same as a 50% margin?No. A 50% markup is a 33.33% margin. A 50% margin needs a 100% markup.
- Can markup be more than 100%?Yes. A markup over 100% means the price is more than twice the cost. Margin stays under 100% while there is any cost.
- Should I price with margin or markup?Use the one your goal is written in. A share of the price you want to keep is a margin: use price = cost ÷ (1 − margin ÷ 100). A percent you add to the cost is a markup.
Sources2 official pages, each read on the date shownShow allHide
- Shopify profit reportshelp.shopify.com · Read
Definitions of profit and margin as used in a store report, and gross margin as (net sales − cost) ÷ net sales × 100. This page is not a Shopify fee estimate.
- Shopify: markup vs marginshopify.com · Read
The definitions of margin and markup, selling price = cost ÷ (1 − target margin) with a $30 cost and 25% margin giving $40, and a markup-to-margin chart. The article shows an update date of September 16, 2026. It has no percentage-fee method. This page does not use its benchmark figures.
Reviewed . First published . Example figures are illustrative.
Found a mistake or something unclear? Tell us. See how we check our pages.