Profit Margin Calculator

$
$
$
%

This calculator calculates profit margin for you.

Enter your revenue and cost, and you get gross profit, margin percentage, markup, and cost ratio instantly.

There is also a reverse mode if you know the margin you want and need to figure out what to charge.


How Profit Margin Calculations Work

Here is how the math works, using a real example. Say you sell a handmade candle for $40 and it costs you $15 to make (materials, labor, packaging).

Gross Profit is the simplest piece. It is just what is left after subtracting cost from revenue.

Gross Profit = Revenue – Cost
$40 – $15 = $25

Gross Profit Margin tells you what percentage of your selling price is profit. This is the number most people mean when they say “margin.”

Gross Profit Margin = (Gross Profit / Revenue) x 100
($25 / $40) x 100 = 62.5%

That means 62.5 cents of every dollar you bring in is gross profit. The other 37.5 cents goes to cover the cost of the product.

Markup is different. It measures profit as a percentage of your cost, not your selling price.

Markup = (Gross Profit / Cost) x 100
($25 / $15) x 100 = 166.67%

You marked the candle up 166% over your cost. That sounds huge compared to the 62.5% margin, but both numbers describe the same transaction. They just look at it from different angles.

Cost Ratio shows what percentage of your revenue goes to covering costs.

Cost Ratio = (Cost / Revenue) x 100
($15 / $40) x 100 = 37.5%

Add the margin (62.5%) and the cost ratio (37.5%) and you always get 100%. That is the check.


Gross Margin vs. Net Margin vs. Markup

A lot of business owners use these terms interchangeably. They should not, because each one measures something different.

Gross Profit Margin

Gross margin only accounts for the direct cost of producing or purchasing your product. That means materials, labor, and anything else directly tied to making or buying what you sell (also called COGS, cost of goods sold). Overhead, like rent, software, marketing, and your own salary are not included.

Gross margin is useful for evaluating individual products and pricing decisions. But it can paint an overly rosy picture of your business’s health.

Net Profit Margin

Net margin is the real bottom line. It accounts for everything: COGS, operating expenses, salaries, rent, interest, taxes. The formula is:

Net Profit Margin = (Net Income / Revenue) x 100

If your candle business brings in $200,000 a year but after rent, payroll, ads, and taxes you net $18,000, your net margin is 9%. That is the number that tells you how much actual money the business is generating.

Markup

Markup is calculated from cost, not revenue. This makes it the natural starting point for pricing. You know what something costs you, so you apply a markup to arrive at a selling price.

The trap is assuming a 50% markup gives you a 50% margin. It does not. A 50% markup on a $10 item means you sell it for $15. Your gross margin is 33.3%, not 50%.

MarkupEquivalent Gross Margin
25%20%
50%33.3%
100%50%
200%66.7%

When your buyer asks, “What is your margin on this?” and you answer with your markup number, you are going to cause confusion. Know which one you are talking about.


How to Calculate Profit Margin in Excel

If you are tracking products or orders in a spreadsheet, you can set up margin calculations with simple formulas.

Assume Column A is your selling price (Revenue) and Column B is your cost (COGS).

Gross Profit in Column C:

=A2-B2

Gross Profit Margin % in Column D:

=(A2-B2)/A2*100

Or format the cell as a percentage and skip the *100:

=(A2-B2)/A2

Markup % in Column E:

=(A2-B2)/B2*100

Cost Ratio % in Column F:

=B2/A2*100

A few things to watch out for in Excel:

  • If your Revenue cell is 0, the margin formula will return a #DIV/0! error. Wrap it in IFERROR: =IFERROR((A2-B2)/A2*100, "N/A")
  • Apply the Percentage format carefully. If you format a cell that already shows 0.625 as a percentage, Excel will display 62.5%. If it shows 62.5, it will display 6250%.
  • For a quick reverse calculation (finding the selling price from cost and desired margin): =B2/(1-desired_margin) where desired_margin is a decimal like 0.4 for 40%.

What Is a Good Profit Margin?

There is no universal answer. Anyone who tells you “10% is good” without knowing your industry is guessing. Here is a realistic breakdown by sector.

Gross Margin Benchmarks by Industry

  • Digital products and SaaS: 70-90%. Low COGS because you are selling something that does not need to be manufactured again after it is built.
  • Beauty and cosmetics: 50-70%. High perceived value relative to production cost.
  • Food and beverage (retail packaged): 30-50%. Competitive market with high packaging and ingredient costs.
  • Apparel and fashion: 40-60% gross margin is common, though fast fashion can push lower.
  • Electronics: 15-25%. Low margins, high competition, and expensive components eat into profit quickly.
  • Traditional retail (physical stores): 30-50% gross margin, with net margins landing between 2-6% after overhead.
  • E-commerce (general): A gross margin of 40-60% is considered healthy. Net margins of 10-20% are what the best-performing Shopify and DTC brands achieve.

What Actually Matters

Gross margin alone does not tell you if a business is healthy. A clothing brand with a 55% gross margin might still be struggling if ad spend, returns, and fulfillment eat most of it. Net margin is the number that matters for long-term sustainability.

For most small businesses and solopreneurs, aim for a gross margin of at least 40% so you have room to cover overhead and still take home something meaningful.


Common Mistakes to Avoid

Confusing markup with margin. If you price products by applying a percentage to your cost and call that your margin, you will consistently underprice your work. A 40% markup gives you a 28.6% margin, not a 40% margin.

Forgetting to include all costs in COGS. Many e-commerce sellers forget to include shipping, packaging, transaction fees, and returns in their cost figure. If it costs you $3.50 to ship a $25 product and you do not count that, your calculated margin will be higher than your actual margin.

Chasing gross margin without watching net margin. A product can have a 70% gross margin and still be losing you money if you are spending heavily on ads to sell it.

Pricing based on gut feel. You might have a number in your head that feels about right. Running the actual math often reveals you are not covering costs the way you thought.

Ignoring the cost ratio. The cost ratio is the flip side of your margin. If your cost ratio is 80%, you are spending 80 cents of every dollar on product. That leaves very little room for anything else.


FAQ

What is profit margin?

Profit margin tells you what percentage of your revenue is actual profit after subtracting costs. Gross profit margin only subtracts the direct cost of goods sold. Net profit margin subtracts all expenses, including overhead, taxes, and interest.

What is the difference between margin and markup?

Margin is calculated as a percentage of the selling price. Markup is calculated as a percentage of the cost. A 50% markup and a 33% margin describe the same transaction. Always clarify which one is being discussed, especially when negotiating with buyers or setting price lists.

How do I find the selling price if I know my target margin?

Use the formula: Selling Price = Cost / (1 – Desired Margin). For a 40% margin on a product that costs you $60: $60 / (1 – 0.40) = $60 / 0.60 = $100. The “Find Selling Price” tab in the calculator above does this automatically.

What does a negative profit margin mean?

A negative margin means your costs are higher than your revenue. You are losing money on each sale. This is sometimes intentional (promotional pricing, loss leaders) but if it is unintentional, it is a pricing problem that needs to be fixed quickly.

Is a higher markup always better?

Not necessarily. A very high markup might put your price above what customers are willing to pay, reducing volume. The goal is finding the price where margin and sales volume combine to produce the best total profit.

How is gross margin different from net margin?

Gross margin only accounts for the cost of goods sold. Net margin accounts for everything else too: salaries, rent, marketing, software, taxes, and interest. It is possible to have a 60% gross margin and a 5% net margin if overhead is high.

Other Financial Calculators / Articles :

I am a huge fan of Microsoft Excel and love sharing my knowledge through articles and tutorials. I work as a business analyst and use Microsoft Excel extensively in my daily tasks. My aim is to help you unleash the full potential of Excel and become a data-slaying wizard yourself.