ADVERTISEMENT

Mobile Banner
320×100

Margin Calculator

Calculate profit margin percentage, gross profit, cost, and revenue for any product or service

Profit Margin Formulas

Profit Margin
Loading formula...
Gross Profit
Loading formula...
Revenue from Margin
Loading formula...
$
$

Understanding Profit Margin

Profit margin is one of the most important financial metrics for any business. It represents the percentage of revenue that remains as profit after accounting for costs. A higher margin indicates better profitability and financial health, while a lower margin may signal pricing issues or excessive costs.

The profit margin calculation is straightforward: subtract your cost from your revenue, then divide by revenue and multiply by 100. For example, if you sell a product for $100 that costs $60 to produce, your profit margin is ($100 - $60) / $100 = 40%. This means 40 cents of every dollar in sales becomes profit.

Understanding and optimizing your profit margins is crucial for business sustainability. Companies with healthy margins can reinvest in growth, weather economic downturns, and provide better returns to stakeholders.

Margin vs Markup: Key Differences

Many people confuse margin and markup, but they represent fundamentally different calculations. Margin is calculated as a percentage of the selling price, while markup is calculated as a percentage of the cost. This distinction has significant implications for pricing and profitability analysis.

📊

Profit Margin

Profit as a percentage of revenue. A 25% margin means $25 profit per $100 sale.

📈

Markup

Profit as a percentage of cost. A 33% markup on $75 cost = $100 price.

🔄

Conversion

25% margin = 33.3% markup. They're different ways to express the same profit.

💡

When to Use

Use margin for financial reporting, markup for setting prices from cost.

Industry Profit Margin Benchmarks

Profit margins vary significantly across industries due to different cost structures, competition levels, and business models. Understanding your industry's typical margins helps you benchmark performance and set realistic targets.

IndustryLow MarginAverage MarginHigh Margin
Software/SaaS 60% 75% 85%+
Professional Services 15% 30% 45%+
Retail (General) 2% 5% 10%+
E-commerce 10% 20% 35%+
Manufacturing 5% 10% 20%+
Food & Beverage 3% 6% 12%+
Healthcare 5% 15% 25%+
Financial Services 15% 25% 35%+

Strategies to Improve Profit Margins

💰

Optimize Pricing Strategy

Test different price points to find the optimal balance between volume and margin. Even small price increases can significantly impact profitability.

📉

Reduce Cost of Goods Sold

Negotiate better supplier terms, improve operational efficiency, or find alternative materials without sacrificing quality.

🎯

Focus on High-Margin Products

Analyze your product mix and emphasize products or services with higher margins in your marketing and sales efforts.

🔧

Improve Operational Efficiency

Streamline processes, automate repetitive tasks, and eliminate waste to reduce overhead costs.

How to use this margin calculator

  1. Pick a mode: Calculate Margin (you know the selling price) or Calculate Revenue (you have a target margin and want the price).
  2. Enter Cost — the all-in cost of producing or acquiring one unit, including direct labor and landed costs, not just the wholesale invoice.
  3. In margin mode, enter Revenue (Selling Price) — what the customer actually pays after discounts. In revenue mode, enter Desired Margin (%) and the calculator solves for the price.
  4. Click Calculate Margin to see gross profit, profit margin, and the equivalent markup percentage side by side.
  5. Compare the margin result against your industry benchmark and the equivalent markup to avoid confusing the two when pricing.

Examples

Basic: a $50 sale with $30 cost

A small e-commerce store sells a product for $50 that costs $30 to source, pack, and ship. The owner wants to know the profit margin on each unit.

ResultGross profit is $20. Profit margin is 40% and the equivalent markup is 66.67%.

The calculator subtracts cost from revenue: $50 − $30 = $20 gross profit. It then divides by revenue: $20 ÷ $50 = 0.40, or 40%. The markup figure uses cost as the denominator: $20 ÷ $30 = 66.67%. Same dollar profit, two different percentages — the only thing that changed is what you divide by.

Intermediate: SaaS at 80% gross margin

A B2B SaaS company charges $200/month per seat. The variable cost per seat (cloud hosting, payment processing, support credits) is $40. The CFO wants to confirm the gross margin matches the SaaS benchmark of 75–85%.

ResultGross profit per seat is $160. Gross margin is 80% — squarely in the healthy SaaS range. Equivalent markup is 400%.

Plug $40 into Cost and $200 into Revenue. Gross profit = $200 − $40 = $160, and margin = $160 ÷ $200 = 80%. Software is high-margin because the marginal cost of serving one more customer is tiny once the product is built. This metric is what investors and benchmarks like Damodaran's industry data refer to as gross margin — it excludes sales, marketing, and R&D, which net margin would capture.

Edge case: razor-thin retail at 4%

A grocery retailer sells a $5.00 carton of milk. The all-in landed cost (wholesale price plus shrinkage and delivery) is $4.80. The owner wonders whether the math actually supports staying in the dairy aisle.

ResultGross profit is $0.20 per carton. Profit margin is 4% and the equivalent markup is 4.17%.

$5.00 − $4.80 = $0.20 in gross profit. Divide by $5.00 to get a 4% margin. At such low margins, volume is everything — selling 10,000 cartons a week produces the same gross profit as a boutique selling 100 high-margin items. This is why grocery and big-box retail focus on inventory turnover and traffic, not per-unit margin, and why a small shift in supplier cost or shrinkage can wipe out the entire profit on a SKU.

How it works

The calculator uses the gross profit margin formula Margin %=RevenueCostRevenue×100\text{Margin \%} = \frac{\text{Revenue} - \text{Cost}}{\text{Revenue}} \times 100. Revenue is what the customer pays; cost is the direct cost of producing or delivering that unit (cost of goods sold). The result is always the share of each sales dollar that is left over before operating expenses, interest, and taxes.

In Calculate Margin mode, you supply Cost and Revenue and the calculator returns gross profit, margin, and the equivalent markup. In Calculate Revenue mode, you supply Cost and Desired Margin (%), and it rearranges the formula to Revenue=Cost1Margin\text{Revenue} = \frac{\text{Cost}}{1 - \text{Margin}} to solve for the price you need to charge.

The markup figure is calculated as Markup %=RevenueCostCost×100\text{Markup \%} = \frac{\text{Revenue} - \text{Cost}}{\text{Cost}} \times 100. It uses the same dollar profit but divides by cost rather than revenue. Because cost is always smaller than revenue when you're profitable, the markup percentage is always larger than the margin percentage for the same transaction.

All math is done client-side and produces a gross margin, not a net or operating margin. To approximate operating or net margin, subtract operating expenses, interest, and taxes from gross profit before computing the percentage — those line items are not part of this calculator's inputs.

When to use this calculator

  • Setting a selling price from a target margin. Use Calculate Revenue mode: enter unit cost and the margin you need to hit (say 45%), and the calculator returns the minimum price. Useful when finance hands you a target and procurement hands you a cost.
  • Auditing a SKU or service line. Enter the actual landed cost and selling price for each product to find low-margin items that may be losing money once overhead is allocated. Sort the worst offenders and decide whether to reprice, renegotiate, or discontinue.
  • Comparing margin against industry benchmarks. Use the industry benchmark table above to see whether a 22% margin is healthy for your sector. A great margin in grocery is mediocre in software, and vice versa.
  • Translating between margin and markup. When a supplier quotes a 50% markup and your boss asks for the margin, plug the numbers in and read both percentages off the result. Prevents the most common pricing arithmetic error.
  • Sanity-checking a discount. Before approving a 20% promotional discount, enter the discounted revenue against your cost to see how much margin actually remains. Discounts erode margin much faster than they erode revenue.

Common mistakes

  • MistakeConfusing margin with markup.
    FixMargin divides by revenue; markup divides by cost. A 50% markup is only a 33.3% margin. Always state which one you mean, and use the conversion: Markup = Margin ÷ (1 − Margin).
  • MistakeReporting gross margin and calling it net margin.
    FixGross margin only subtracts cost of goods sold. Net margin subtracts operating expenses, interest, and taxes too. A business with a 60% gross margin can still have a 5% net margin — don't compare apples to oranges.
  • MistakeUsing wholesale invoice price as cost.
    FixTrue cost of goods sold includes freight in, duties, packaging, payment processing, and shrinkage. Excluding them inflates the margin and produces prices that lose money once the real costs land.
  • MistakeSetting a single margin target across very different products.
    FixDifferent SKUs have different price elasticity, competition, and substitutability. A blanket margin rule overprices commodity items and underprices premium ones. Set margin targets at the product-line level, not the company level.
  • MistakeIgnoring discounts and returns when measuring margin.
    FixUse net revenue — gross sales minus discounts, returns, and chargebacks — as the revenue input. Per US GAAP and IFRS revenue-recognition guidance, this is the figure that flows to the top of the income statement, and it's the only honest base for a margin calculation.

Frequently asked questions

What is the difference between margin and markup?

Margin is profit as a percentage of revenue: ($20 profit on a $50 sale) ÷ $50 = 40% margin. Markup is the same dollar profit divided by cost: $20 ÷ $30 cost = 66.67% markup. Margin is what shows up on income statements and benchmarks; markup is what you add to cost when setting a price. Use the conversion Markup = Margin ÷ (1 − Margin) to translate between them.

What is the difference between gross margin and net margin?

Gross margin only subtracts cost of goods sold (direct materials, direct labor, freight) from revenue, so it measures production and pricing efficiency. Net margin subtracts everything — operating expenses, interest, depreciation, and taxes — so it measures bottom-line profitability. A software company with an 80% gross margin might still have only a 10% net margin after sales, marketing, and R&D.

How is operating margin different from gross and net margin?

Operating margin sits between the two. It subtracts both cost of goods sold and operating expenses (SG&A, R&D) from revenue but excludes interest and taxes. It shows how profitable the core business is independent of capital structure. SEC EDGAR filings (10-K and 10-Q reports) break out all three so investors can compare peers.

What is a good profit margin?

A 'good' margin depends entirely on the industry. Software and SaaS often hit 75–85% gross margins, e-commerce typically lands at 25–35%, restaurants run 60–70% on food cost but 3–6% net margin, and grocery retail averages 2–4%. The SBA and Damodaran's industry datasets are good cross-industry references — always benchmark against companies of similar size and business model.

How do I improve my profit margin?

There are four main levers: raise prices (test small increases on segments where demand is inelastic), reduce cost of goods sold (renegotiate suppliers, improve yield, change packaging), shift the mix toward higher-margin products, and cut operating expenses to lift net margin without touching gross margin. Most healthy improvement comes from a combination, not from cutting one line item to zero.

Why might a low-margin business still be valuable?

Because profit equals margin times volume. A grocery chain making 2% on $100 billion in revenue earns $2 billion in gross profit — more than many high-margin software companies. Low-margin businesses can be enormously valuable when they have scale, fast inventory turnover, defensible distribution, or moats like real estate. Margin alone doesn't tell you if a business is a good business.

Should I include shipping and payment processing in cost?

Yes, if they're variable per-unit costs. For e-commerce, freight in, freight out, packaging, and payment-processing fees should all sit in cost of goods sold for an honest gross margin. If you exclude them, the margin number looks great until you check the bank account at the end of the month.

Can the profit margin be negative?

Yes. If cost exceeds revenue — for example, selling at a loss to clear inventory or running a customer-acquisition promotion — the margin is negative. The formula still works: ($80 revenue − $100 cost) ÷ $80 = −25%. A negative margin is a red flag at the unit-economics level even if the business is healthy overall.

How do I calculate margin from markup?

Use Margin = Markup ÷ (1 + Markup). A 50% markup becomes 0.50 ÷ 1.50 = 33.3% margin. The reverse is Markup = Margin ÷ (1 − Margin), so a 40% margin equals 66.7% markup. Plug the numbers into this calculator in margin mode and the equivalent markup is displayed automatically.

Does revenue include sales tax or VAT?

No. Revenue in a margin calculation is net of sales tax, VAT, GST, and similar pass-through taxes, because those amounts are collected on behalf of the government and don't belong to the business. Using gross-of-tax revenue inflates the margin and can mislead pricing decisions. IRS Publication 535 and the AICPA's revenue-recognition guidance both treat collected taxes as a liability, not revenue.

How often should I review my margins?

At minimum quarterly, and monthly for fast-moving or price-sensitive categories. Supplier costs, freight, currency rates, and promotional discounts all drift over time, and a margin that was healthy last quarter can erode silently. A simple cadence: pull your top-20 SKUs by revenue each month and recompute landed-cost margin.

Why does the calculator cap desired margin below 100%?

Because the formula Revenue = Cost ÷ (1 − Margin) blows up as margin approaches 100% — the denominator approaches zero and the implied price approaches infinity. Mathematically, a 100% margin would mean cost is zero, which only applies to information goods with no marginal cost. The calculator caps the input at 99.99% to keep results finite and meaningful.

Sources

Methodology

This calculator computes gross profit margin using Margin % = (Revenue − Cost) ÷ Revenue × 100, where Revenue is the net selling price and Cost is the direct cost of goods sold for that unit. In Calculate Revenue mode it rearranges the formula to Revenue = Cost ÷ (1 − Margin) to solve for price given a target margin, with margin capped below 100% to keep results finite. The equivalent markup percentage is reported alongside using (Revenue − Cost) ÷ Cost × 100. Operating expenses, interest, and taxes are not part of the calculation, so the result is a gross margin rather than an operating or net margin.

Pro Tips

  • Bookmark this calculator for quick access in the future
  • Use the share button to send your results to others
  • Try different scenarios to compare outcomes
  • Check out our related calculators for more insights

Found this calculator helpful? Share it with others:

Embed this calculator