Margin Calculator

Enter any two of cost, price, margin, or profit and this profit margin calculator fills in the rest, and shows the equivalent markup, so you never confuse the two again.

Enter any two values

Fill in exactly two fields. Leave the other two blank and the calculator solves for them. Margin here is gross margin, profit as a percentage of revenue.

Your result

Strong

Gross margin

60.0%

Equivalent markup

150.0%

Cost

$40.00

Revenue / price

$100.00

Profit

$60.00

Margin vs markup

60.0% / 150.0%

Margin is not markup

A 60.0% gross margin equals a 150.0% markup on cost. Margin divides profit by revenue; markup divides the same profit by cost, so markup is always the larger number. Quoting a supplier markup as if it were your margin is the most common pricing mistake.

This is a gross margin, it covers the direct cost of the product only. Your net margin, after shipping, transaction fees, ad spend, and returns, will be lower. Treat 60.0% as the ceiling, not the take-home.

Gross margin looks fine. What about margin after ads and returns?

Daymark connects Shopify, Google Ads, and Meta Ads so you see net margin per product after every cost, not just the gross number a spreadsheet shows.

See how Daymark tracks this live →

What Is a Margin Calculator?

A margin calculator works out the relationship between four numbers that every priced product has: cost, selling price, profit, and margin. Enter any two and it solves for the other two. This page also does the thing most margin calculators skip: it shows the equivalent markup, so you can see at a glance how a margin percentage and a markup percentage describe the same sale in two different ways.

Gross margin % = (Revenue − Cost) / Revenue × 100

If a product costs $40 and sells for $100, the profit is $60 and the gross margin is 60%. The same sale carries a 150% markup, because markup measures that $60 profit against the $40 cost instead of the $100 price. More on that gap below, because it is the single most expensive point of confusion in pricing.

Profit Margin Calculator: Gross, Operating, and Net

"Profit margin" is not one number. This tool calculates gross margin, profit after the direct cost of the product only. Two other margins sit below it:

  • Gross margin subtracts the cost of goods sold (COGS): the product, inbound freight, and anything else it costs to make the unit sellable. This is what the calculator above returns.
  • Operating margin also subtracts operating expenses: salaries, software, rent, overhead.
  • Net margin subtracts everything else too, taxes, interest, one-off costs, and is what actually reaches the bank.

For an ecommerce brand the most useful working number sits between gross and net: contribution margin, which takes gross margin and subtracts the variable costs of selling one more unit, shipping, payment fees, discounts, returns, and ad cost. A 60% gross margin can become a 25% contribution margin once those are counted. If you want that fuller number, use the contribution margin calculator, and see gross margin and net profit margin for the definitions.

Markup vs Margin: the Difference That Costs Money

Markup and margin use the same profit but different denominators:

  • Margin = profit ÷ revenue
  • Markup = profit ÷ cost

Because cost is always smaller than revenue, markup is always the larger percentage. A 50% margin is a 100% markup. A 40% margin is a 67% markup. A supplier who tells you to "add a 40% markup" is not handing you a 40% margin, you would land at roughly 29%.

Gross marginEquivalent markup
20%25%
33%50%
40%67%
50%100%
60%150%

The mistake happens when someone sets prices by markup, then reports the business by margin, and quietly assumes the two numbers are the same. On a full catalog, that assumption can wipe out the profit you thought you were making. Set the price with the markup calculator, then confirm the margin here.

How to Calculate Gross Margin

  1. Add up the cost of goods sold for the product: the unit cost plus inbound freight and any per-unit fees to get it sellable.
  2. Subtract that cost from the selling price to get gross profit.
  3. Divide gross profit by the selling price and multiply by 100.

Gross margin % = (Price − COGS) / Price × 100

A $28 product that costs $12 to make has $16 of gross profit and a 57% gross margin. Enter any two of those figures above and the calculator returns the rest, plus the markup.

Worked Ecommerce Example

A skincare brand sells a serum for $48. The formula, bottle, and inbound freight cost $16.80.

InputValue
Selling price$48.00
Cost of goods$16.80
Gross profit$31.20
Gross margin65%
Equivalent markup186%

A 65% gross margin looks comfortable. But this brand also pays a $6.50 pick-and-ship cost, roughly $1.40 in payment fees, and acquires the customer for about $14 in ad spend. After those variable costs, the $31.20 of gross profit becomes about $9.30 of contribution, a 19% contribution margin, not 65%. The gross margin is real, but it is the ceiling, not the take-home. That gap between the headline margin and the money left over is exactly what Daymark is built to keep visible.

What Is a Healthy Margin?

There is no universal target, because margins vary widely by category. As rough gross-margin reference points for consumer brands:

  • Apparel and accessories: often 55% to 65% gross.
  • Beauty and supplements: frequently 65% to 80% gross, because unit costs are low.
  • Food and beverage: commonly 30% to 45% gross.
  • Electronics and hardware: often 20% to 40% gross.

The number that matters more than the benchmark is whether your margin covers your cost to acquire and serve a customer with enough left over to grow. A 70% gross margin brand that spends 55% of revenue on ads is thinner than a 40% gross margin brand that acquires customers cheaply. Always read gross margin next to contribution margin and customer acquisition cost, not on its own.

What a Margin Calculator Leaves Out

Margin is profit as a share of price; markup is profit as a share of cost. Gross margin covers COGS only; net margin covers everything. A margin calculator gives you the clean gross figure fast, but the profit that reaches your account depends on the variable costs it does not include. To connect price, cost, and every downstream cost into one live number, see how Daymark pulls Shopify, ad platforms, and shipping data together in plain English.

Frequently asked questions

How do you calculate profit margin?

Gross margin = (Revenue − Cost) ÷ Revenue × 100. Subtract the cost of the product from its selling price to get profit, divide that profit by the selling price, and multiply by 100. A $100 sale on a $40 cost has $60 of profit and a 60% gross margin. Enter any two of cost, price, margin, or profit above and the calculator solves for the rest.

What is the difference between margin and markup?

Margin divides profit by the selling price; markup divides the same profit by cost. Because cost is smaller than price, markup is always the larger number. A 50% margin equals a 100% markup, and a 40% margin equals a 67% markup. Confusing the two is the most common pricing mistake, which is why this calculator shows both.

What is the difference between gross margin and net margin?

Gross margin subtracts only the cost of goods sold. Net margin subtracts everything else too: shipping, payment fees, ad spend, returns, overhead, and taxes. A product with a 65% gross margin can end up with a 15% net margin once those costs are counted. Gross margin is the ceiling; net margin is what actually reaches your account.

How do I convert margin to markup?

Markup = Margin ÷ (100 − Margin) × 100. For a 40% margin: 40 ÷ 60 = 0.667, so a 67% markup. To go the other way, Margin = Markup ÷ (100 + Markup) × 100. The calculator handles this automatically and displays the equivalent markup next to every margin result.

What is a good profit margin for ecommerce?

It depends on category. Beauty and supplements often run 65% to 80% gross margin, apparel 55% to 65%, food and beverage 30% to 45%, electronics 20% to 40%. More important than the benchmark is whether your margin covers customer acquisition cost with room left to grow. Read gross margin alongside contribution margin and CAC, never on its own.

Is this a gross margin or net margin calculator?

This calculates gross margin, which covers the direct cost of the product only. For ecommerce, the more useful working number is contribution margin, which also subtracts shipping, fees, discounts, and returns per order. Use the contribution margin calculator for that fuller figure, and treat the gross margin here as the starting point.

Can I calculate cost or price from a target margin?

Yes. Enter the margin you want plus one other value. Give it a selling price and a target margin and it returns the cost you need to hit; give it a cost and a target margin and it returns the price to charge. That makes it a pricing tool, not just a reporting one, since you can work backwards from the margin you need.

Gross margin is the ceiling. See the net margin under it.

Daymark connects Shopify, Google Ads, and Meta Ads so you see real net margin per product after every cost, in plain English, no SQL, flat $100/month for the whole team.

No credit card required