Profit Margin Calculator

Easily calculate your profit margin with our precise and user-friendly Calculadora de Margen de Ganancia.

  • Instant result
  • No sign-up
  • Visible assumptions
  • Deterministic calculation

In 30 seconds: Quickly determine your profit margin to make informed business decisions. Deterministic calculation with auditable formulas. The result is indicative — adjust the assumptions to reflect your real operation.

Methodology

Gross Profit = Selling Price − Product Cost

Gross Margin (%) = (Gross Profit ÷ Selling Price) × 100

Net Profit = Gross Profit − Operating Expenses

Net Margin (%) = (Net Profit ÷ Selling Price) × 100

Markup (%) = (Gross Profit ÷ Product Cost) × 100

Variables

Selling Price
The price at which you sell the product or service to the customer.
Product Cost
What it costs you to acquire or produce the product.
Operating Expenses
Indirect costs associated with the sale (shipping, fees, packaging).

Practical example

You sell a product for $100. It cost you $60 to produce it and you have $10 of operating expenses per unit.

Gross profit: $100 − $60 = $40 (gross margin: 40%).

Net profit: $40 − $10 = $30 (net margin: 30%).

Markup: ($40 ÷ $60) × 100 = 66.7%. This means you charge a 66.7% markup on your cost.

The difference between margin (30%) and markup (66.7%) is crucial: if you use markup as if it were margin, you'll underestimate your real costs.

Interpretation

Gross margin indicates what percentage of the selling price is profit before operating expenses.

Net margin reflects your real profit after all costs. If it's negative, you lose money on every sale.

Markup is useful for setting prices: if your cost is $60 and you want a 40% margin, you need a 66.7% markup, not a 40% one.

Monitor your net margin continuously. Operating expenses tend to creep up over time and erode your profit.

Assumptions and limitations

  • Computes margins on a single product or service at a time.
  • Does not include sales taxes.
  • Operating expenses are per unit sold, not fixed business expenses.
  • For a complete profitability analysis, combine with the break-even calculator.

When to use this calculator

  • When setting prices for the first time. Margin tells you how much you earn on each sale. If you don't know your margin, you don't know whether you're making or losing money on each transaction.

  • To compare profitability between products or business lines. A product that sells a lot with a 5% margin can be less profitable than one that sells less with a 40% margin.

  • When a customer asks for a discount. If your net margin is 25% and the customer asks for 30% off, you'd be selling at a loss. Knowing your margin gives you negotiating power.

  • To evaluate whether a sales channel is profitable. Selling in a marketplace with a 15% fee can wipe out your profit if your gross margin is only 20%. Calculate net margin after fees.

  • To define your strategy: high margin and low volume, or low margin and high volume. Luxury businesses operate at 60-80% margins; mass retail at 3-8%.

  • When suppliers raise prices. Immediately calculate how it affects your margin and decide whether to absorb the increase or pass it to the customer.

Common mistakes

  • Confusing margin with markup. If your product costs $60 and you sell it for $100, your margin is 40% (profit/price) but your markup is 66.7% (profit/cost). If someone tells you to "apply a 40% markup" and you calculate a 40% margin, you'll be charging less than needed.

  • Calculating margin on cost instead of price. Margin is always calculated by dividing profit by selling price, not by cost. This confusion can make you think you earn more than you really do.

  • Forgetting per-unit operating expenses. Your gross profit is not your real profit. Sales commissions, packaging, shipping, shrinkage, returns and payment processing reduce your real margin. A product with 50% gross margin may have only 15% net margin.

  • Not differentiating between per-unit margin and business-level margin. Per-unit margin ignores fixed costs (rent, payroll, software). A 30% margin per product doesn't mean your business is 30% profitable. You need to combine this analysis with break-even.

  • Assuming every product should have the same margin. In practice, successful businesses have "hook" products with low margins that attract customers and complementary products with high margins that generate the profit.

  • Not considering the effect of volume on costs. Buying more units lets you negotiate better supplier prices (economies of scale), improving your margin. But it only works if you can actually sell the volume.

Industry use cases

Retail and fashion

A boutique buys clothing wholesale for $250 and sells for $650. Gross margin: 61.5%. With $80/garment operating expenses (packaging, fees, shipping), net margin drops to 49.2%. The 160% markup is standard in fashion. The key is controlling end-of-season markdowns that can wipe out profit.

Food and beverage

A food truck sells tacos for $25 with ingredient cost of $8 and operating expenses of $5 (gas, disposables, fees). Gross margin: 68%, net margin: 48%. Perishable food has a 10-15% shrinkage risk that must be baked into the real variable cost.

Tech and electronics

A tech-accessories store buys phone cases for $40 and sells them for $180. Impressive 77.8% gross margin. But with 15% marketplace fee ($27), advertising ($15) and shipping ($30), real net margin is 47.8%. Accessories subsidize low-margin main products.

Professional services

A design agency charges $12,000 for a logo with $2,000 direct cost (designer hours) and $1,500 operating expenses (tools, revisions). Net margin: 70.8%. Professional services have the highest margins but are capped by team capacity.

Cosmetics and beauty

A cosmetics brand produces a face cream for $45 (ingredients + packaging) and sells it for $350. Gross margin: 87.1%. With marketing ($50), distribution ($30) and free samples ($15), net margin is 60%. Beauty operates on high margins to fund marketing and R&D.

Construction and hardware

A hardware store sells a bag of cement for $180 with $155 cost and $5 expenses (handling, storage). Net margin: 11.1%. Basic construction materials have low margins but high, steady volume. Profitability comes from accessories and tools with 40-60% margins.

Methodology and assumptions

How results are calculated, what we assume when modeling, and where the method loses precision.

Formula

Gross margin = (Price − Cost) ÷ Price · Net margin = (Price − Cost − Expenses) ÷ Price

Assumptions

  • Product cost only includes the unit direct cost (COGS).
  • Operating expenses represent the per-unit allocable cost.
  • No income tax; the result is pre-tax.

Applicability limits

  • Margin on cost (markup) and margin on price yield different numbers — use the right one for the channel.
  • Does not differentiate between products of the same SKU sold across channels with different commissions.
  • Does not factor in seasonality or recurring promotional discounts.

Sources

  • Kotler & Keller — Marketing Management (15th ed., Pearson).
  • Horngren, Datar & Rajan — Cost Accounting: A Managerial Emphasis (16th ed., Pearson).

You know your margin. Now explore how different prices affect your profitability with the sensitivity matrix. Pricing Simulator

Embed on your site

This calculator is free and embeddable. Copy this snippet into your blog or website so your readers can run it directly from there.

Responsive width, fixed height. Adjust `height` to fit your layout.

Want to go beyond the quick calculation?

Sign up to access advanced simulators with multiple scenarios, data export, and detailed projections.

No spam. Just early access to the profit margin calculator simulator.

Complete guide

Profit Margin Calculator: Gross Margin, Net Margin, and the Markup Confusion

Margin and markup are not the same thing — and mixing them up is one of the most common and costly pricing mistakes in small business. This calculator computes all three metrics from two inputs (cost and selling price), but understanding what each number means is what turns the output into better pricing decisions.

The Three Core Formulas

Gross Margin (%):

Gross Margin = (Revenue - COGS) / Revenue x 100

Where COGS (Cost of Goods Sold) includes the direct cost of producing or acquiring the product: materials, direct labor, and allocated manufacturing overhead. Gross margin tells you what percentage of each sale is available to cover operating expenses and generate profit.

Markup (%):

Markup = (Selling Price - Cost) / Cost x 100

Markup is cost-based: it expresses profit as a percentage of the cost. A 100% markup on a MXN 100 product means you sell it for MXN 200 — but that is a 50% gross margin, not 100%.

Net Margin (%):

Net Margin = Net Income / Revenue x 100

Net income = Revenue minus all expenses: COGS, operating expenses, depreciation, interest, and taxes. Net margin is the bottom line — what percentage of revenue actually becomes profit after every cost is accounted for.

Why Margin and Markup Are Not the Same — A Worked Example

A retailer sources a product at MXN 100 and sells it at MXN 250.

  • Markup: (250 - 100) / 100 x 100 = 150%
  • Gross Margin: (250 - 100) / 250 x 100 = 60%

Same transaction, two very different-looking numbers. Many SMB owners target a "50% margin" but actually calculate "50% markup" — which is only a 33% gross margin. The result: they underprice systematically, especially after adding shipping, returns, and overhead. The correct calculation: if your target is 60% gross margin, set your price at Cost / (1 - 0.60) = Cost x 2.5.

Conversion formulas:

Margin to Markup: Markup % = Margin % / (1 - Margin %)

Markup to Margin: Margin % = Markup % / (1 + Markup %)

Contribution Margin vs Gross Margin

Gross margin uses COGS (which may include fixed production overhead). Contribution margin separates only variable costs:

Contribution Margin = (Revenue - Variable Costs) / Revenue x 100

Contribution margin is more useful for break-even analysis and incremental pricing decisions. If you are deciding whether to take a bulk order at a 10% discount, the relevant question is whether the discounted price exceeds your variable cost — not whether it exceeds your average COGS.

2026 Industry Benchmark Table

IndustryTypical Gross MarginTypical Net Margin
SaaS / software70-85%10-25%
E-commerce / retail25-45%2-8%
Restaurants / food service60-70% (food cost inverted)5-15%
Manufacturing20-35%5-12%
Professional services50-70%15-30%
Construction15-25%2-8%
Artisan bakery (Mexico)65-72% food cost inverted6-12%

Note: restaurant industry convention is to report "food cost" (the inverse of gross margin on food) rather than gross margin. A 32% food cost = 68% gross margin on food revenue.

Pricing Strategy: How to Use Margin to Set Prices

Cost-plus pricing starts from COGS and adds the desired markup: Selling Price = Cost x (1 + Markup). Simple to implement but ignores what customers are willing to pay and what competitors charge.

Target-margin pricing sets the selling price to achieve a desired gross margin: Selling Price = Cost / (1 - Target Gross Margin). Example: cost MXN 80, target 60% margin. Price = 80 / (1 - 0.60) = MXN 200.

Value-based pricing sets price based on perceived value to the customer, working backwards to verify the resulting margin is acceptable. Software and professional services companies that achieve 80%+ gross margins are almost never using cost-plus — they are anchoring price to customer ROI.

Competition-based pricing sets price at or near market price, then evaluates whether the resulting margin is sustainable. Retail commodities and e-commerce marketplaces often force this approach.

How to Use This Calculator Step by Step

  1. Enter the unit cost (COGS per unit): what you pay to produce or source each item.
  2. Enter the selling price (what the customer pays, before any taxes that you remit to the government, e.g., before IVA if you do not keep IVA).
  3. Read gross margin % — this is the per-unit contribution to overhead and profit.
  4. Read markup % — this is how much above cost you are pricing.
  5. Add operating costs (rent, labor, marketing as % of revenue) to estimate net margin.

Common Mistakes

  • Including taxes in cost but not in selling price (or vice versa). Always keep cost and price on the same tax basis (both ex-IVA or both inclusive). Mixing bases inflates or deflates margin.
  • Confusing markup and margin. A 50% markup is not a 50% margin. See formulas above.
  • Ignoring volume effects. High gross margin means nothing if fixed overhead is not covered. At 100 units/month vs 1,000 units/month, net margin can swing from negative to 20%.
  • Not accounting for returns and discounts. Effective margin = (gross revenue minus returns minus discounts) minus COGS. SaaS companies with high refund rates and ecommerce stores with 20%+ return rates see real margins significantly below calculator output.
  • Treating one-time cost spikes as permanent COGS. A shipping surcharge during peak season is not a permanent change in COGS; do not let it permanently reset your prices.

Target Gross Margin by Pricing Tier

For product businesses, gross margin targets should scale with the pricing strategy:

  • Commoditized products (identical to competition): 15-30% gross margin is typical; compete on volume and operational efficiency.
  • Differentiated products (branded, quality, unique features): 40-60% gross margin is achievable; value-based pricing reinforces differentiation.
  • Premium or luxury products: 60-80% gross margin; brand premium supports pricing above functional value.

A business with 25% gross margin and 12% operating expenses has 13% EBIT margin. A business with 60% gross margin and the same operating expense rate has 48% EBIT margin — identical revenue, dramatically different profitability. Gross margin is the multiplier that determines how much operating leverage each dollar of additional revenue generates.

Real SMB Case: Cafeteria in Mexico City Improving Net Margin

A small cafeteria in Colonia Roma, Mexico City, had 2023 revenue of MXN 1,200,000/year and food cost of MXN 516,000 (43% food cost = 57% gross margin). Operating costs (rent MXN 18,000/month, 2 employees, utilities) totaled MXN 420,000. Net income: MXN 264,000 = 8.3% net margin.

The owner ran a margin analysis by product and found that three items — a house sandwich, a smoothie, and a specialty coffee — had food cost below 25% but were underpriced by comparison to similar items nearby. Repricing these three items 15% upward (an average of MXN 12 per item) while eliminating two high-food-cost items (a steak plate at 62% food cost and a fruit bowl at 55%) shifted the revenue mix.

2024 result: revenue MXN 1,180,000 (slightly down from menu simplification), food cost MXN 446,000 (37.8% food cost = 62.2% gross margin), same operating costs. Net income MXN 314,000 = 14.1% net margin — a 70% improvement in net profit from menu re-engineering, with no increase in customer count.

From theory to calculation

The calculator on this page runs with your numbers — no forms, no login. Scroll up and try it.

Try the calculator

Frequently asked questions

1What is a Calculadora de Margen de Ganancia?
A Calculadora de Margen de Ganancia is a tool used to calculate the profit margin of a product or service. It helps businesses determine the percentage difference between cost and selling price, ensuring effective pricing strategies.
2How do I calcular margen de ganancia using this calculator?
To calcular margen de ganancia, input your cost price and selling price into the calculadora margen. The tool automatically computes the profit margin percentage, showing how much profit you earn relative to the selling price.
3Why is margen ganancia important for businesses?
Margen ganancia is crucial because it reflects the profitability of products or services. Monitoring it helps businesses set competitive prices, manage costs effectively, and ensure sustainable financial growth.
4Can I use the calculadora margen for different currencies?
Yes, most calculadora margen tools allow you to input prices in various currencies. Ensure consistent currency use for cost and selling prices to get an accurate margen de ganancia calculation.
5What factors affect the accuracy of calcular marge results?
Accurate calcular marge results depend on precise input of cost and selling prices. Additional factors like taxes, discounts, and shipping costs may impact the final margen de ganancia and should be considered.

Last updated: April 30, 2026 · Reviewed by the Simúlalo editorial team. Figures and benchmarks are indicative; verify with your own data before deciding.

View methodology