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
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.
Gross margin isn’t what you keep
After shipping, payment fees, ad spend, and returns, your net margin is lower.
Daymark reads these costs from your Shopify, ad, and shipping data and shows net margin per product.
What Is a Margin Calculator?
A margin calculator works out four numbers that every product has: cost, selling price, profit, and margin. Enter any two. It solves for the other two. This page also shows the matching markup, so you can see how a margin percent and a markup percent describe the same sale two ways.
Gross margin % = (Revenue − Cost) / Revenue × 100
Say a product costs $40 and sells for $100. The profit is $60, and the gross margin is 60%. The same sale is a 150% markup. Markup measures that $60 profit against the $40 cost, not the $100 price. That gap trips up a lot of pricing. More on it below.
Profit Margin Calculator: Gross, Operating, and Net
"Profit margin" is not one number. This tool gives you gross margin, which is profit after the cost of the product only. Two other margins sit below it:
- Gross margin takes out the cost of goods sold (COGS): the product, inbound freight, and anything else it costs to make the unit ready to sell. This is what the calculator above returns.
- Operating margin also takes out operating costs: salaries, software, rent, and overhead.
- Net margin takes out everything else too, like taxes and interest. Net margin is what reaches the bank.
For an ecommerce brand, the most useful number sits between gross and net. It is contribution margin. It starts with gross margin and takes out the variable costs of selling one more unit: shipping, payment fees, discounts, returns, and ad cost. A 60% gross margin can drop to a 25% contribution margin once you count those. For that fuller number, use the contribution margin calculator. See gross margin and net profit margin for the definitions.
Markup vs Margin
Markup and margin use the same profit but a different base:
- Margin = profit ÷ revenue
- Markup = profit ÷ cost
Cost is always smaller than revenue, so markup is always the bigger percent. A 50% margin is a 100% markup. A 40% margin is a 67% markup. If a supplier tells you to "add a 40% markup," that is not a 40% margin. You land at about 29%.
| Gross margin | Equivalent markup |
|---|---|
| 20% | 25% |
| 33% | 50% |
| 40% | 67% |
| 50% | 100% |
| 60% | 150% |
The mistake is simple. Someone sets prices by markup, then reads the business by margin, and treats the two numbers as the same. Across a full catalog, that can wipe out profit you thought you had. Set the price with the markup calculator, then check the margin here.
How to Calculate Gross Margin
- Add up the cost of goods sold: the unit cost, inbound freight, and any per-unit fees to make it ready to sell.
- Take that cost out of the selling price. That gives you gross profit.
- 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 numbers above, and the calculator returns the rest, plus the markup.
Gross Margin Example (Ecommerce)
A skincare brand sells a serum for $48. The formula, bottle, and inbound freight cost $16.80.
| Input | Value |
|---|---|
| Selling price | $48.00 |
| Cost of goods | $16.80 |
| Gross profit | $31.20 |
| Gross margin | 65% |
| Equivalent markup | 186% |
A 65% gross margin looks fine. But this brand also pays $6.50 to pick and ship, about $1.40 in payment fees, and about $14 in ad spend to get the customer. After those costs, the $31.20 of gross profit drops to about $9.30. That is a 19% contribution margin, not 65%. The gross margin is real. It is just the most you can keep, not the amount you take home. That gap, between the headline margin and the money left over, is what Daymark keeps in view.
What Is a Good Profit Margin?
There is no single target. Margins vary a lot by category. For broader D2C numbers across metrics, see our D2C ecommerce benchmarks. Here are rough gross-margin ranges for consumer brands:
- Apparel and accessories: often 55% to 65% gross.
- Beauty and supplements: often 65% to 80% gross, because unit costs are low.
- Food and beverage: often 30% to 45% gross.
- Electronics and hardware: often 20% to 40% gross.
The benchmark matters less than one question: does your margin cover what it costs to get and serve a customer, with enough left to grow? A brand with a 70% gross margin that spends 55% of revenue on ads can be thinner than a brand with a 40% gross margin. The second brand just gets customers cheaply. 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 number fast. But the profit that reaches your account depends on the variable costs it leaves out. To connect price, cost, and every later cost into one live number, see how Daymark pulls Shopify, ad platform, 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 most you can keep; 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.
More Free Tools for You
Markup Calculator
Turn cost into a selling price, or find the markup that hits a target margin, with the resulting margin shown.
Open tool →
Contribution Margin Calculator
Calculate contribution margin per order and max CAC from real variable costs, not just gross margin.
Open tool →
Net Profit Per Order Calculator
See true net profit per order after COGS, shipping, fees, ad spend, discounts, and returns.
Open tool →
See your real margin after every cost
This page shows gross margin. Daymark connects your Shopify, Google Ads, and Meta Ads data and shows net margin per product after ads, shipping, fees, and returns. Plain English, no SQL. Plans from $49/month based on monthly Shopify orders, with all features included.