Gross Margin & Markup Calculator
Enter your unit cost, target gross margin, and monthly volume to calculate the correct selling price, gross profit per unit, equivalent markup percentage, and annual revenue and profit — plus a pricing error section that shows exactly how much profit you lose annually by applying your margin target as a markup.
Download This Calculator
Get the Excel spreadsheet behind this calculator to use offline, customize for your needs, and publish as a web tool using Sheetflow.
Download Excel FileCorrect Margin Formula
Uses cost ÷ (1 − margin%) — not markup math — so the price you set actually delivers the gross margin your finance team requires.
Annual Cost of Pricing Errors
Calculates exactly how many dollars per year you lose when margin targets are applied as markup — using your actual cost and volume, not a generic percentage.
Discount & Cost Sensitivity
Shows margin compression from a 10% price discount and the impact of a COGS increase — the two numbers you need before any negotiation or supplier repricing.
Frequently Asked Questions
What is the difference between gross margin and markup?
Gross margin and markup both measure profitability on a sale, but they use different denominators — and that difference makes them numerically unequal even when describing the exact same transaction.
Gross margin = (Selling price − Cost) ÷ Selling price × 100. Profit as a percentage of revenue. Markup = (Selling price − Cost) ÷ Cost × 100. Profit as a percentage of cost.
For a product that costs $50 and sells for $83.33: gross margin is $33.33 ÷ $83.33 = 40%, while markup is $33.33 ÷ $50 = 66.7%. Same dollars, different percentages. Margin is always lower than markup for the same transaction because selling price — margin's denominator — is always larger than cost — markup's denominator. The two percentages converge only at 0% profit.
The conversion formulas if you need to move between them:
- Markup to margin: Margin = Markup ÷ (1 + Markup)
- Margin to markup: Markup = Margin ÷ (1 − Margin)
A 40% margin requires a 66.7% markup. A 50% margin requires a 100% markup. A 66.7% margin requires a 200% markup.
The practical implication: if your finance team or investor model requires a 40% gross margin and you set prices by applying a 40% markup to cost, you will charge $70 instead of $83.33 on a $50 cost — and earn 28.6% margin, not 40%. At 200 units per month, that error costs $32,000 in annual profit.
How do I calculate the correct selling price from a target margin? (Step-by-step example)
The formula most businesses use is wrong. The common approach — selling price = cost × (1 + target margin%) — is markup math, not margin math. It will systematically underprice every product you sell.
The correct formula: Selling price = Cost ÷ (1 − Target margin%)
Here is a complete walkthrough using the default scenario: a wholesale distributor pricing a product for a retail customer.
Inputs:
- Unit cost: $50.00 (landed wholesale cost including freight)
- Target gross margin: 40% (required by the finance team)
- Volume: 200 units per month
Step 1: Calculate the correct selling price. $50.00 ÷ (1 − 0.40) = $50.00 ÷ 0.60 = $83.33. Verify: ($83.33 − $50.00) ÷ $83.33 = $33.33 ÷ $83.33 = 40.0% ✓
Step 2: Find the equivalent markup to give your sales team. ($83.33 − $50.00) ÷ $50.00 × 100 = 66.7%. Sales teams and buyers typically think in markup, not margin. Telling them "price at 66.7% markup on cost" produces the right $83.33 price. Telling them "price at 40% margin" and letting them apply it as a markup produces $70.00 — and a 28.6% margin.
Step 3: Calculate annual volume impact. $83.33 × 200 units × 12 months = $200,000 annual revenue. $200,000 × 40% margin = $80,000 annual gross profit.
Step 4: Quantify the pricing error. Wrong price (markup applied as margin): $50.00 × 1.40 = $70.00. Actual margin at $70.00: ($70.00 − $50.00) ÷ $70.00 = 28.6% — not 40%. Annual profit at wrong price: ($70.00 − $50.00) × 200 × 12 = $48,000. Annual profit lost to pricing error: $80,000 − $48,000 = $32,000.
Step 5: Check sensitivity before any negotiation or cost change. A 10% discount drops price to $75.00 and compresses margin to 33.3%. A 15% COGS increase raises cost to $57.50 and compresses margin at $83.33 to 31.0%. Both numbers define the floors below which the deal or cost structure stops working.
What is a good gross margin by industry?
Gross margin benchmarks vary widely by business model because they reflect the ratio of direct costs to revenue — and that ratio is structurally different across industries.
| Industry | Typical gross margin range |
|---|---|
| Software / SaaS | 70–85% |
| Professional services / consulting | 50–70% |
| E-commerce / direct-to-consumer | 30–50% |
| Manufacturing | 25–45% |
| Wholesale distribution | 15–30% |
| Grocery / food retail | 20–35% |
| Restaurants (food cost only) | 60–75% |
| Construction / contracting | 20–35% |
Gross margin is not net margin. Gross margin excludes operating expenses — rent, salaries, marketing, software, and administration. A 40% gross margin business with 35% operating expenses produces a 5% net margin. The gross margin needs to be high enough to cover operating costs and leave a viable net margin after them.
COGS definitions vary. Some businesses include direct labor in COGS; others do not. Some include shipping; others classify it as operating expense. When comparing your gross margin to an industry benchmark, make sure your COGS definition matches the benchmark's. A distributor who includes freight-in and warehouse labor in COGS will show a lower gross margin than one who classifies those as operating expenses — even at identical underlying economics.
How much does a discount actually cost in gross margin?
More than most people intuitively expect, because discounts compress margin asymmetrically — the cost stays flat while the price falls, so every dollar of discount comes directly out of profit.
In the default scenario — $83.33 selling price, $50.00 cost, 40.0% margin — a 10% discount:
- Reduces price from $83.33 to $75.00
- Keeps cost at $50.00
- Reduces gross profit from $33.33 to $25.00
- Compresses margin from 40.0% to 33.3% — a 6.7 percentage point drop
That 6.7 pp compression from a 10% price discount is a 17% reduction in gross margin. The relationship is nonlinear — businesses with thinner starting margins take proportionally harder hits from the same percentage discount.
Compression effect at common margin levels from a 10% price discount:
| Starting gross margin | 10% price discount → new margin | Margin lost |
|---|---|---|
| 50% | 44.4% | 5.6 pp |
| 40% | 33.3% | 6.7 pp |
| 30% | 22.2% | 7.8 pp |
| 20% | 11.1% | 8.9 pp |
The lower your starting margin, the more damage the same discount causes. A business operating at 20% gross margin that gives a 10% discount is cutting its margin almost in half. That context is worth having before approving a price exception — which is exactly what the discount sensitivity output in this calculator provides.
Why do so many businesses accidentally use markup math when they should be using margin math?
The mistake is persistent because the two formulas feel similar at low percentages and diverge dramatically at higher ones — by the time the gap is obviously large, the pricing habit is already established.
At 10% target: markup formula gives $55.00 ($5 profit), margin formula gives $55.56 ($5.56 profit). The error is $0.56 per unit — easy to ignore.
At 40% target: markup formula gives $70.00 ($20 profit), margin formula gives $83.33 ($33.33 profit). The error is $13.33 per unit — $32,000 per year at 200 units per month.
At 60% target: markup formula gives $80.00 ($30 profit), margin formula gives $125.00 ($75 profit). The error is $45 per unit — deeply material at any volume.
The confusion persists for three structural reasons. First, cost-plus pricing — add a percentage to your cost and call it the price — is intuitive and widespread, and markup is native to cost-plus thinking. Second, the two formulas produce the same result only at 0% profit, so the error is invisible unless you verify the output. Third, the words "margin" and "markup" are used interchangeably in many industries, sales teams, and accounting systems.
The verification is simple: after setting any price, check whether (selling price − cost) ÷ selling price equals your target margin. If you charged $70.00 on a $50.00 cost with a 40% target: ($70.00 − $50.00) ÷ $70.00 = 28.6%. Not 40%. The check takes five seconds and catches the error every time — or use the pricing error section of this calculator, which runs it automatically and shows you the annual cost of the gap.
Transform Your Excel Models into Web Tools
Turn your complex Excel calculations into online calculators, web forms, and APIs. No coding required — upload your spreadsheet and publish your calculations instantly.
Calculations are for estimation and planning purposes. Users should verify important results for their specific situations. No signup required. Calculations performed securely.