Free · Client-side · No signup

Profit Margin Calculator

Calculate gross margin, net margin, and markup in any currency. Includes a reverse-solve mode to find the selling price needed to hit a target margin — and a stacked-bar breakdown that shows where every dollar of revenue actually goes.

3 calculation modes9 currenciesLive resultsMargin vs markup explained
$
$
Gross profit
$10.00
Gross margin
33.33%
Markup
50.00%
Profit / revenue ratio
0.333
Notice the gap between markup and margin
Your markup (50.00%) is higher than your margin (33.33%) by 16.67%. This is the most common pricing confusion in ecommerce — quoting one when you mean the other.

Margin vs markup: the confusion that costs ecommerce sellers thousands

Take a $20 item that you sell for $30. The profit on that sale is $10. Now answer this honestly: is the margin 50% or 33%? Most people say 50%. Most people are wrong. The markup is 50%. The margin is 33%.

Here is the difference. Markup divides profit by cost — $10 of profit on $20 of cost is 50% markup. Margin divides profit by revenue — $10 of profit on $30 of revenue is 33.3% margin. Same dollar of profit, two different denominators, two completely different numbers. The trap is that the words sound interchangeable until you actually try to set prices with them.

We see this play out constantly with ecommerce founders. They will say "I want a 40% margin" and then mark every product up by 40%. The result is not a 40% margin — it is a 28.6% margin. Across a year of sales, that is the gap between "profitable enough to reinvest" and "eating into the war chest". The same mistake in the other direction inflates pricing past what the market will pay, and you watch conversion rate quietly slide while you congratulate yourself on the "healthy margin".

The fix is to pick one and use it consistently. Internally, most finance teams use margin because it is what shows up on the income statement — gross profit divided by revenue is gross margin, and that flows straight from the top line. Wholesalers and distributors tend to think in markup because they are pricing up from a known cost. Whichever side of that fence you sit on, the calculator above shows both numbers side by side so the conversation with your accountant or your supplier never gets lost in translation.

Gross, operating, and net margin — what the layers actually mean

Three different margins, three different jobs. Investors care about all three for very different reasons.

Gross margin
(Revenue − COGS) / Revenue

Revenue minus the direct cost of producing the product or service. Tells you how much money is left to cover everything else — rent, salaries, ads, taxes. A high gross margin means the underlying unit economics work. A low one means no amount of operational discipline will save you.

Operating margin
(Gross profit − OpEx) / Revenue

After subtracting operating expenses like salaries, rent, software, and marketing — but before interest and tax. This is the margin investors look at when judging how well the business is being run. It strips out financing decisions and tax jurisdictions to show the pure operating story.

Net margin
(Operating profit − tax − interest) / Revenue

After everything: COGS, operating expenses, interest, and tax. Net margin is what actually ends up in retained earnings or available for distribution. It is the number that determines whether the business is sustainable and whether the founder can ever pay themselves a dividend.

What's a "good" margin in your industry?

There is no universal benchmark. A 30% margin would be world-class for a grocery chain and a sign of distress for a SaaS company. The right comparison is always to peers in your specific industry, at your specific stage. Here are the rough ranges we see most often, expressed as gross margin (pre-OpEx, pre-tax) unless noted.

SaaS / Software

70–90%

Cost to serve one more customer is mostly hosting. Sub-60% gross usually means heavy services revenue or expensive third-party APIs (OpenAI, Twilio, payments). Net margins land between 10–25% because of heavy reinvestment in sales and R&D.

Ecommerce / DTC

20–30% net, 50%+ gross

Gross margins of 50–70% on the product line, but transaction fees, ad spend, returns, and fulfillment crush it down to 5–15% net for most stores. The brands earning 25%+ net are usually higher AOV (jewelry, furniture) or genuinely differentiated.

Restaurants

5–10% net

Famously thin. Food costs alone are 28–35% of revenue, labor another 30%+, plus rent, utilities, and waste. Quick-service can hit 10–15% net at scale; full-service is lucky to clear 5%.

Agencies / Consulting

10–25% net, 40–60% gross

Gross margin depends heavily on freelancer mix vs in-house. Agencies that sub-contract everything run lean but volatile. In-house teams have higher fixed costs but more predictable margins. The 25%+ club is almost always specialized — niche industry, niche skill, or both.

Retail (general)

25–50% gross

Big spread. Big-box retail (Walmart, Costco) operates on 20–25% gross margins and makes it work on volume. Specialty retail (Apple stores, Lululemon) runs 40–55% gross. Net margins for most retailers land between 2–6%.

Manufacturing

20–35% gross

Highly variable by industry. Industrial machinery sits at 25–35%, consumer goods at 30–40%, contract manufacturing closer to 15–20%. Capital intensity drives a lot of the variance — you need fat gross margins to amortize plant and equipment.

Ranges are pre-tax gross margins unless noted. Always compare against peers in your specific industry and at your specific stage — early-stage businesses often run thinner margins than mature peers because they are still building scale.

Heads up

Five pricing mistakes that silently destroy margin

Margin death is rarely dramatic. It happens half a percentage point at a time, in places nobody is watching. These are the leaks we see most often when auditing client P&Ls.

1

Confusing markup for margin when setting prices

The number-one error. Founder wants a 40% margin, marks every product up by 40%, and ships at a 28.6% margin instead. Across a year of sales that is six figures of evaporated profit on a small ecommerce store. Use the calculator above and verify both numbers before publishing prices.

2

Ignoring transaction fees in the margin calculation

Stripe is 2.9% + $0.30 per transaction. Marketplace platforms (Amazon, Etsy, Shopify Markets) take 8–30%. PayPal is 3.49% + a fixed fee for many transactions. None of these show up on a price tag, but all of them come out of margin. A $50 product on Amazon with a 15% referral fee is really $42.50 of revenue — recompute your margin against that, not the gross price.

3

Free shipping thresholds priced wrong

"Free shipping over $75" sounds great until you do the math. If your average shipping cost is $9 and your blended gross margin is 35%, every order between $75 and $100 is losing 5–10% of margin to subsidized shipping. The threshold has to be set so that the incremental profit from the larger order more than covers the shipping cost. Most stores set it by feel and bleed quietly.

4

Discount stacking that pushes margin negative

Welcome 15% off, plus first-time-buyer 10% off, plus loyalty 5% off, plus a Black Friday 20% off — and now 50% of your gross margin is gone. The marketing team owns each discount in isolation; nobody owns the stack. Build a hard floor on combined discount percentage and audit it monthly.

5

Failing to recompute pricing when input costs rise

Ocean freight tripled in 2021. Aluminum jumped 50% in 2022. AI API costs swing every quarter. Most businesses set prices once and revisit them annually, by which point a 10% input cost increase has already eaten three or four months of profit. Set a recurring 90-day pricing review on the calendar and use the reverse-solve tab to recalibrate to a target margin.

Margin is downstream of customer acquisition

Especially as AI search reshapes how people find your products.

The cleanest way to improve net margin is rarely to cut costs — it is to acquire customers more efficiently. A SaaS business with $200 customer acquisition cost on a $40/month plan needs five months of payback before the customer turns profitable. Cut CAC to $100 and you double net margin without touching pricing or COGS.

This is where SEO and AEO matter to the income statement. Organic traffic is the cheapest acquisition channel by an enormous margin — once a page ranks, every visitor it sends is essentially free for the life of the ranking. The same applies to AI citations: when ChatGPT, Perplexity, or Google AI Overviews recommend your product, you pay nothing per visit.

If you want to know whether AI engines are recommending your business — and what to fix if they are not — RankNow.ai's AEO Analyzer tests your pages against real prompts on ChatGPT, Perplexity, Google AI Overviews, and Bing Copilot.

FAQ

Profit Margin Calculator FAQ

Everything we get asked about gross margin, net margin, markup, and pricing strategy.

Contact Support

Margin is profit divided by revenue. Markup is profit divided by cost. They describe the same dollar of profit from two different angles, which is why people mix them up. A $20 cost item sold for $30 has a $10 profit. The markup is 50% (10 / 20). The margin is 33.3% (10 / 30). If you set prices using markup but report performance using margin, your numbers will never line up. Pick one for pricing decisions and stick with it.

It depends on the industry. A 50% gross margin is excellent for ecommerce or restaurants, average for agencies and consulting, and below average for SaaS. The number that actually matters is your net margin after operating expenses, taxes, and fees — and whether it gives you enough cash to reinvest, pay yourself, and absorb a bad month. A 50% gross margin that becomes a 5% net margin after Stripe fees, ad spend, and shipping is not a healthy business.

Start with revenue, subtract COGS to get gross profit, then subtract operating expenses (rent, salaries, software, marketing) to get operating profit. Subtract interest and taxes from that to get net profit. Net margin is net profit divided by revenue. The shortcut formula: Net margin = (Revenue − COGS − OpEx) × (1 − tax rate) / Revenue. The calculator on this page does it for you in real time.

Because gross margin only accounts for the direct cost of producing the product or service. Everything else — rent, salaries, software subscriptions, ad spend, payment processing fees, shipping subsidies, refunds, taxes — comes out between gross and net. A typical ecommerce store with a 40% gross margin often ends up with a 5-10% net margin once everything is paid. That gap is normal. It is also where most pricing mistakes hide.

The formula is identical. What changes is what you put into COGS. For ecommerce, COGS is the landed cost of the product (manufacturing + inbound shipping + duties + warehousing). For services, COGS is the direct labour cost of delivering the engagement (the consultant's time, contractor fees, project-specific tools). For SaaS, COGS is hosting, third-party APIs, and customer-facing support staff. Get the COGS line right and the margin math takes care of itself.

Use the Net margin tab and enter your effective tax rate (not the headline corporate tax rate — the rate you actually pay after deductions). The calculator multiplies your pre-tax operating profit by (1 − tax rate) to get net profit. If you are a sole proprietor or LLC paying tax personally, use your blended income tax rate. If you are a C-corp, use your effective corporate rate from last year's return. When in doubt, ask your accountant for your effective rate.

Mature SaaS businesses run 70-90% gross margins because the cost to serve one more customer is mostly hosting and a fractional support cost. If your SaaS has a gross margin under 60%, something is unusual — usually heavy services revenue mixed in, expensive third-party APIs (think OpenAI, Twilio, or payments), or oversized customer success headcount. Net margins for public SaaS companies typically land between 10-25% because they reinvest heavily in sales and R&D.

Use the Reverse-solve tab. Enter your cost and target margin (40), and the calculator returns the selling price. The formula is: Price = Cost / (1 − target margin). For a $30 cost item at 40% target margin, the price is $30 / 0.6 = $50. Note: this gives you a 40% margin only if your cost number includes everything that varies with each unit sold — product cost, fulfillment, payment processing, expected returns. Skip those and your real margin will be lower than the target.

Inbound shipping (factory to your warehouse) goes into COGS — it is part of the landed product cost. Outbound shipping (warehouse to customer) is trickier. If you charge customers exactly what shipping costs, treat it as a pass-through and exclude it from both revenue and COGS. If you offer free shipping or flat-rate shipping, the difference between what you charge and what you pay is a real margin hit and belongs in COGS. Most ecommerce stores get this wrong and overstate their gross margins by 5-10 points.

Healthy margins are easier when traffic is free. Find out if AI engines recommend you.

RankNow.ai's AEO Analyzer tests your pages against real prompts on ChatGPT, Perplexity, Google AI Overviews, and Bing Copilot — so you know which pages get cited and which get ignored.

Try AEO Analyzer Free