Margin vs markup: how to calculate each

  • Guide
  • Reviewed October 14, 2026
  • 5 min read
  • No sign-up

Margin vs markup comes down to one thing: what you divide the profit by. Margin divides profit by the selling price. Markup divides the same profit by the cost. The profit in dollars stays the same, so only the percentage changes.

The short answer

Margin
40%
$24.00 profit ÷ $60.00 price
Markup
66.67%
$24.00 profit ÷ $36.00 cost

Same $24.00 of profit. Margin divides by the price, markup by the cost.

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:

Profit = selling price − included cost
Margin (%) = profitselling price × 100
Markup (%) = profitincluded cost × 100

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.

Margin: $24 ÷ $60 × 100 = 40.00%.
Markup: $24 ÷ $36 × 100 = 66.67%.

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.

Two towers with the same blue profit block on top. A frame wraps the whole left tower, but only the cost block of the right one.
Margin compares profit with the whole price. Markup compares the same profit with the cost only.

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:

Price = cost(1 − target margin100)
  1. 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.

A price tag made of a large cost part and a blue top part, next to a measuring post as tall as the whole tag.
The price is the cost plus the share you want to keep. That share is measured against the whole price.

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 (%) = 100 × markup(100 + markup)
Markup (%) = 100 × margin(100 − margin)
Illustrative positive-margin conversions
MarginEquivalent 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

  1. 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.
  2. 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.
  3. 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
  1. 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.

  2. 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.