Profit Margin Calculator
Selling something for $100 that cost you $70? Your gross margin is 30% — not 43%. Those are different calculations, and confusing them is one of the most expensive pricing mistakes. Enter revenue and cost below, or use target price mode to work backward from a margin you need.
Last updated: April 2026
Revenue + cost → gross profit margin
Enter the selling price (revenue) and the cost to find gross profit, gross margin percentage, and markup percentage.
Price for a target margin
Enter your cost and the gross margin % you want to achieve. We’ll calculate the minimum selling price.
Convert markup % to margin %
If you know your markup percentage, enter it here to find the equivalent gross margin.
How to calculate gross profit margin
The gross margin formula is: Gross margin% = ((Revenue − Cost) ÷ Revenue) × 100. Revenue is the selling price; cost is the direct cost to produce or source the item (also called Cost of Goods Sold, or COGS).
Worked example
A product sells for $120. It costs $72 to produce. Gross profit = $120 − $72 = $48. Gross margin = $48 ÷ $120 = 40%. That means 40 cents of every dollar of revenue is gross profit, before operating costs are deducted.
Gross margin vs net margin
Gross margin only subtracts the direct cost of making or buying the product. Net margin subtracts everything: salaries, rent, utilities, marketing, interest, and taxes. A software business might have a 80% gross margin but a 15% net margin after paying its engineers and servers. A restaurant might have a 65% gross margin on food cost but a 5% net margin after staffing, rent, and waste. This calculator computes gross margin — the most useful number for pricing decisions.
Markup vs margin: what’s the difference?
This is one of the most commonly confused concepts in business pricing. Both use the same profit figure — they just express it as a percentage of different things.
Markup
Profit ÷ Cost × 100
On a $60 cost, $100 sell: $40 ÷ $60 = 66.7% markup
Gross Margin
Profit ÷ Revenue × 100
On a $60 cost, $100 sell: $40 ÷ $100 = 40% margin
Markup is always higher than margin for the same transaction. A 50% markup equals a 33.3% margin. A 100% markup equals a 50% margin. If a supplier quotes a “50% margin” but means markup, the actual margin is only 33.3% — a costly confusion when building a pricing model. Use the markup calculator to work directly from cost and markup percentage to selling price.
Typical gross margins by industry
| Industry | Typical gross margin | Note |
|---|---|---|
| Ecommerce (physical goods) | 40–60% | Higher with private label; lower in commodities |
| Software / SaaS | 70–85% | Low COGS; high operating costs |
| Retail (apparel) | 50–60% | Fast fashion lower; luxury much higher |
| Restaurants / food service | 60–70% | On food cost alone; net margin is 3–10% |
| Freelancing / services | 80–95% | Minimal COGS; time is the main cost |
| Electronics / consumer tech | 25–40% | Component costs compress margins |
How to price for a target margin
Use the formula: Selling price = Cost ÷ (1 − Margin%). To achieve a 40% margin on a $60 product: $60 ÷ (1 − 0.40) = $60 ÷ 0.60 = $100. Profit = $40, which is 40% of $100. This is the correct way to price — adding 40% to cost ($84) gives a 40% markup but only a 28.6% margin, short of target. Use the “Price for a target margin” section in the calculator above to run any scenario instantly.
Margin after discounts and promotions
When you offer a discount, your margin compresses unless your cost also falls. A product with a 50% gross margin selling for $100 (cost $50) drops to a 37.5% margin at 20% off ($80 revenue, still $50 cost). If you regularly run promotions, factor this into your base pricing — a promotional price that cuts margin below your break-even contribution is a loss. The discount + tax calculator shows the net price after discount and tax in one step, useful for checking whether a promoted price still covers direct costs. When pricing for US markets, the sales tax rates by state table has the combined rate for every state.
Break-even margin
Your break-even gross margin is the minimum margin needed to cover fixed costs at your expected volume. If your fixed costs are $8,000/month and you sell 200 units at $100 each ($20,000 revenue), you need at least a 40% gross margin to break even ($8,000 ÷ $20,000). Margin above 40% contributes to net profit; below it, you operate at a loss regardless of revenue. This is why margin — not just revenue — is the number that matters for sustainable pricing.
Margin vs salary: same concept, different context
Gross margin measures how much of each sale you keep after direct costs — the business equivalent of a pay rise. If your margin improves from 35% to 42% on the same revenue, that’s a 20% increase in gross profit. The salary raise calculator applies the identical percentage-increase logic to employment income.
Frequently asked questions
Gross profit margin = (Revenue − Cost of Goods Sold) ÷ Revenue × 100. It measures what percentage of each sale is profit after covering the direct cost to produce or source the item. It does not include operating expenses, salaries, rent, or taxes — those reduce it further to net margin.
A gross margin of 40–60% is considered healthy for ecommerce selling physical goods. After shipping, returns, advertising, and platform fees, net margins of 10–20% are sustainable. Below 25% gross margin makes profitability difficult once overheads are included.
Margin = Markup ÷ (1 + Markup), using decimal form. A 50% markup (0.50) ÷ 1.50 = 0.333 = 33.3% margin. A 100% markup ÷ 2 = 50% margin. Use the conversion tool in the calculator above.
Selling price = Cost ÷ (1 − 0.30) = Cost ÷ 0.70. For a $42 cost: $42 ÷ 0.70 = $60 selling price. Profit = $18, which is 30% of $60. Use the “Price for a target margin” section in the calculator above.
Gross margin only subtracts the direct cost of goods from revenue. Net margin subtracts all costs including operating expenses, salaries, rent, interest, and taxes. Net margin is almost always lower. This calculator computes gross margin.
A discount reduces revenue while your cost stays fixed, so margin falls. A 50% margin product at $100 (cost $50) drops to 37.5% margin at 20% off ($80 revenue, $50 cost). A 30% margin product at $100 (cost $70) goes negative at 30% off — you’d be selling below cost. Always check margin at your promotional price before running a discount.
It depends heavily on the sector. Service businesses (consulting, freelancing) can achieve 80–95% gross margin since COGS is near zero. Product businesses typically target 40–60%. Anything below 30% leaves very little to cover overhead and profit after operating costs are deducted.
Yes — completely free, no signup, no ads. All calculations run instantly in your browser and nothing is stored or sent anywhere.