Finance

Margin Calculator

Calculate gross margin percentage, markup percentage, and profit. Or find the selling price needed to achieve your target margin.

Price your products for profitability

Every business, from retail stores to software companies, must balance pricing with profitability. Too low a price loses money; too high drives customers away. Margin and markup are the tools that bridge this gap. Margin is the percentage of revenue that's profit (selling price minus cost, divided by selling price). Markup is how much you've increased the price above cost. A product costing $10 sold for $20 has a 50% markup but only a 50% margin. Salespeople, business owners, and accountants juggle these metrics constantly, and confusion between them is common—but critical. This calculator clears the confusion: calculate your margins and markups from revenue and cost, or work backward to find the price needed to hit a target margin.

Healthy margins vary widely by industry. Grocery stores operate on 2–5% margins because sales volume is high and customer loyalty is driven by location and convenience. Software companies target 70%+ margins because they sell digital products without physical inventory or production costs. Luxury goods might target 60%+ margins to cover marketing and overhead. Understanding the ideal margin for your industry is essential for setting sustainable, competitive prices.

Understanding margin vs. markup

  • Gross margin: Percentage of revenue that's profit. Formula: (revenue - cost) / revenue × 100. A $100 item with $40 cost has 60% margin.
  • Markup: Percentage increase from cost to selling price. Formula: (revenue - cost) / cost × 100. A $40 item sold for $100 is marked up 150%.
  • The key difference: Margin is calculated on selling price (revenue-focused); markup is calculated on cost (cost-focused). Same profit, different perspective.
  • Why it matters:Margin reflects actual profitability; markup shows how much you've added. A 100% markup equals 50% margin. Knowing both prevents mispricing.
  • Cost of Goods Sold (COGS): Direct production costs—materials, labor—excluding overhead. For accurate margins, use COGS, not total operating costs.

Real-world pricing examples

  • Retail clothing: A shirt costing $15 to make is sold for $49. Margin: 69%. Markup: 227%. Retailers need high markups because of returns, shrinkage, and overhead.
  • Coffee shop: A latte costing $1.20 (coffee, milk, cup) sells for $5.50. Margin: 78%. Markup: 358%. High margins subsidize rent and labor.
  • Software SaaS: A subscription service with server costs of $0.50/month per user selling for $29/month has 98% margin. Digital products scale with near-zero incremental cost.
  • E-commerce electronics: A monitor costing $180 wholesale sold for $249 has 28% margin and 38% markup. Electronics have low margins due to fierce competition.
  • Luxury goods: A designer handbag with $300 production costs sold for $2,000 has 85% margin. Premium positioning justifies high markups.

Frequently asked questions

What's a healthy margin for my business?

It depends on your industry. Grocery: 2–5%. Retail: 20–40%. Restaurants: 5–15%. Software: 60–90%. Research competitors and industry benchmarks, then account for your operating costs, taxes, and profit goals.

How do I calculate margin if I know cost and desired profit?

If cost is $60 and you want $40 profit, selling price is $100. Margin is (100 - 60) / 100 = 40%. This calculator handles it—use "From Target Margin" mode and work backward.

Should I include labor and overhead in COGS?

No. COGS includes direct production costs only (materials, manufacturing labor for the specific product). Operating overhead (rent, management salaries) is tracked separately. Using the wrong cost figure skews your margin.

Why do some products have negative margins?

A negative margin (selling below cost) is a loss. It might happen due to misscalculation, competitive pressure, or as a loss leader (selling one product cheaply to attract customers). It's unsustainable long-term.