Finance tools
Profit margin calculator
Free profit margin calculator, gross margin calculator, and margin calculator for US small businesses. Enter cost (COGS) and selling price for live profit margin %, profit dollars, and markup — or set a target margin to find the price you need. Learn how to calculate profit margin for a product with no submit button. Export CSV or PDF when you are done. For markup-first pricing, see our markup calculator.
What profit margin means
Profit margin (often called gross margin on product pricing) is profit expressed as a percentage of selling price — not cost. It answers: “Of every dollar I collect, how much is profit after COGS?”
If a product costs $80 (COGS) and you sell it for $100, profit is $20. Gross margin = $20 ÷ $100 = 20% profit margin. The same sale has a 25% markup on cost ($20 ÷ $80) — same dollars, different base.
This tool is for product and service pricing — not stock-trading or forex “margin” (see FAQ).
Find margin (default)
Cost + selling price → gross margin %, profit, and markup %.
Target margin
Cost + desired margin % → required selling price and markup %.
Find markup
Cost + markup % → equivalent margin % for markup-minded pricing.
Gross vs net profit margin
Gross profit margin uses revenue minus COGS only — direct materials, wholesale, or unit labor. It shows whether your price covers what it costs to make or buy the product.
Operating margin (and EBITDA margin) sit between gross and net: they subtract operating expenses like payroll and rent from revenue, but not interest or taxes. They describe business efficiency, not a single SKU price.
Net profit margin subtracts all operating expenses, interest, and taxes from revenue. It is the fullest picture of profitability but needs a full P&L — not just two product inputs.
This calculator focuses on product-level gross margin (cost + price). Use it for pricing; use your accounting system for operating and net margin.
How to calculate profit margin
The standard gross profit margin formula:
Core formulas
Profit = Selling price − Cost
Margin % = (Profit ÷ Selling price) × 100
Selling price = Cost ÷ (1 − Margin% ÷ 100)
Enter cost (COGS)
What you pay per unit before overhead — materials, wholesale, direct labor.
Enter selling price or target margin
Find margin from an existing price, or target margin to solve for the price you need.
Read margin, profit, and markup
Results update as you type. Export CSV or PDF for quotes or pricing models.
How to calculate profit margin for a product
Product pricing starts with one unit: what you pay (COGS) and what you charge (selling price). The profit margin percentage tells you how much of each sale is profit after direct costs.
Gather cost per unit
Include materials, wholesale, packaging, and direct labor tied to one item — not rent, marketing, or payroll overhead.
Set or test selling price
Use your current price in Find margin mode, or enter a target margin % to solve for the price you need.
Calculate profit margin
Profit = Price − Cost. Margin % = Profit ÷ Price × 100. Example: $25 profit on a $100 sale = 25% margin.
Compare markup and break-even
Check equivalent markup % in results, then model volume with the break-even calculator if you have fixed costs.
Quick targets
35% margin on $50 cost → sell at $76.92 (Target margin mode).
70% margin on $30 cost → sell at $100.
30% markup is not 30% margin — 30% markup on $100 cost is only 23.08% margin ($130 price). See markup calculator.
Margin vs markup
Margin divides profit by selling price. Markup divides profit by cost. For the same sale, markup % is always higher than margin %.
Quick reference
20% margin = 25% markup ($100 cost → $125 price)
30% margin = 42.86% markup ($100 cost → $142.86 price)
For markup ↔ margin conversion and a fourth Convert tab, use the markup calculator.
| Margin on price | Equivalent markup on cost | Example ($100 cost) |
|---|---|---|
| 20% | 25% | Sell at $125 · $25 profit |
| 30% | 42.86% | Sell at $142.86 · $42.86 profit |
| 40% | 66.67% | Sell at $166.67 · $66.67 profit |
| 50% | 100% | Sell at $200 · $100 profit |
Worked examples
Basic example: $80 cost, $100 selling price → 20% margin, $20 profit, 25% markup.
Higher-margin example: $60 cost, $100 revenue → 40% margin, $40 profit.
Target margin — 30% on $100 cost: Use target margin mode → sell at $142.86 (not $130 — that would be 30% markup).
Related: break-even calculator, percentage calculator.
What is a good profit margin?
There is no universal “good” margin — it varies by industry, channel, and business model. Gross margin on a product can look strong while net margin is thin after overhead. Use benchmarks as planning guides, not targets.
| Industry | Typical gross margin | Notes |
|---|---|---|
| Retail & apparel | 30–50% | Higher for boutique; lower for electronics |
| Grocery | 5–25% | Volume-driven, thin margins |
| Restaurants | 60–70% | Food cost often 28–35% of menu price |
| Software / SaaS | 70–85%+ | Low COGS; high OPEX elsewhere |
| Professional services | 40–70%+ | Labor-heavy; price on value |
| Ecommerce (general) | 20–50% | Shipping and fees compress net margin |
Sector averages (NYU Stern, US) show how far gross margin can sit above net margin after operating costs:
| Sector | Avg. gross margin | Avg. net margin |
|---|---|---|
| Software (system & application) | 72.4% | 22.9% |
| Advertising | 29.9% | 3.0% |
| Business & consumer services | 33.7% | 7.1% |
| Apparel | 54.3% | 3.0% |
Is 30% profit margin a lot? For many product businesses, 30% gross margin is healthy — above typical retail gross ranges and strong for physical goods. For SaaS, investors often expect higher gross margins; for grocery, 30% would be exceptional. Context beats a single rule of thumb.
Profit margin in Excel
Formulas that mirror this calculator — format result cells as Percentage where noted.
| Task | Formula | Example |
|---|---|---|
| Margin from cost & price | =(Price-Cost)/Price | =(100-80)/100 → 20% |
| Profit percentage (same as margin) | =(Price-Cost)/Price | Profit ÷ revenue as % |
| Price from target margin | =Cost/(1-Margin) | =100/(1-0.3) → 142.86 |
| Price from target margin (decimal) | =Cost/(1-MarginDecimal) | =50/(1-0.35) → 76.92 |
| Profit dollars | =Price-Cost | =100-80 → 20 |
| Markup from margin | =Margin/(1-Margin) | =0.2/(1-0.2) → 25% markup |
Format margin cells as Percentage. In Google Sheets, use the same formulas with = syntax.
Export CSV from the calculator to open inputs and results in Excel or Google Sheets — faster than rebuilding a profit margin calculator Excel template from scratch.
Product margin — not trading margin
Different meaning of “margin”
Some sites combine product gross margin with stock or forex margin (borrowed capital). This tool is only for pricing: COGS, selling price, and profit margin %. It is not a leverage or brokerage calculator.
More free tools
Discover more calculators for time tracking, payroll, and HR.
Frequently asked questions about this profit margin calculator
What is profit margin?
Profit margin is the percentage of selling price that is profit after subtracting cost (COGS). Formula: (Selling price − Cost) ÷ Selling price × 100. A 20% margin on a $100 sale means $20 profit.
How do you calculate gross profit margin?
Subtract COGS from selling price to get profit, then divide by selling price: Gross margin % = (Revenue − COGS) ÷ Revenue × 100. Enter cost and price in Find margin mode for instant results.
What is the difference between gross and net profit margin?
Gross margin uses COGS only. Net margin includes operating expenses, interest, and taxes. This calculator shows product-level gross margin; net margin needs your full P&L.
What is the difference between margin and markup?
Margin uses selling price as the base; markup uses cost. 25% markup = 20% margin on the same sale. Use our markup calculator for markup-first pricing and margin ↔ markup conversion.
Is 30% markup the same as 30% margin?
No. 30% markup on $100 cost → $130 price → 23.08% margin ($30 profit ÷ $130). To earn a 30% margin on $100 cost, sell at $142.86. Use Target margin mode here or the Convert tab on the markup calculator.
What is 30% margin on $100?
If you mean $100 selling price with 30% margin, profit is $30 (cost would be $70). If you mean $100 cost with a 30% margin target, sell at $142.86 — use Target margin mode.
How do I calculate a 20%, 30%, 35%, or 70% profit margin price?
Divide cost by (1 − margin as decimal): Price = Cost ÷ (1 − 0.30) for 30% margin. Examples on $100 cost: 30% → $142.86; 35% → $153.85; 70% → $333.33. The calculator’s Target margin mode does this live.
What is a good profit margin?
It depends on industry and whether you mean gross or net margin. Many product businesses target 30–50% gross margin; SaaS often exceeds 70% gross but lower net after payroll. Is 30% profit margin a lot? For retail and physical goods, yes — it is strong. Is 40% or 50% margin high? Common in software and services; rare in grocery. Negative margin means you lose money on each sale. See the industry tables above.
How do I calculate profit margin in Excel?
With cost in A1 and price in B1: profit =B1-A1, margin =(B1-A1)/B1 formatted as percentage. Target price for 30% margin: =A1/(1-0.3). Same formulas work in Google Sheets. Or export CSV from this calculator.
What is the profit margin formula?
Gross profit margin % = (Selling price − Cost) ÷ Selling price × 100. Equivalently: Profit ÷ Revenue × 100. To solve for price: Selling price = Cost ÷ (1 − Margin% ÷ 100).
Is this for product pricing or stock/forex margin?
Product and service pricing only. Stock, forex, and brokerage “margin” mean borrowed capital — not gross profit margin on a sale. This tool uses COGS and selling price.
How is this different from your markup calculator?
This page is margin-first (default: find margin from cost + price). The markup calculator is markup-first with a Convert tab. Both share the same math and export — pick the URL that matches how you search.