Gross Margin Calculator
Enter a selling price and the cost of goods sold to find your gross margin — and the equivalent markup, side by side.
On $100.00 of revenue with $60.00 of cost, the profit is $40.00. That's a gross margin of 40.00% — and an equivalent markup of 66.67%.
Results update as you type.
Formula
Gross margin is profit as a percentage of revenue:
margin% = (revenue − cost) / revenue × 100.
The same gap expressed as markup divides by cost instead:
markup% = (revenue − cost) / cost × 100.
For a profitable product, markup is always the larger of the two — they only equal at zero.
When this calculator helps
Gross margin is the share of each sale you keep after the direct cost of goods, and it is one of the numbers any US small business or startup founder should be able to quote on demand. Use this calculator when you are setting a price, deciding whether a product line pulls its weight, or sizing up how a vendor price increase hits the bottom line. Enter the selling price and the cost of goods sold, and you get the profit in dollars, the margin as a percentage of revenue, and the matching markup.
It is built for the decisions that actually move a business: pricing against a competitor, comparing two product lines that sell at different price points, or putting a clean figure in front of an investor or an SBA lender. Banks and VCs lean on gross margin because it signals whether the unit economics work — a strong margin is what shows the model can survive a slow quarter and still fund growth.
How to read your result
The percentage is your gross profit as a share of the selling price. A 40% margin means that out of every dollar of revenue, 40 cents is gross profit and 60 cents covered the direct cost of what you sold. The higher the number, the more room you have to pay for overhead, payroll and marketing before you hit break-even.
The classic mix-up to avoid is margin versus markup. Margin divides profit by the selling price; markup divides the same profit by the cost. A $40 profit on a $100 item that cost $60 is a 40% margin but a 67% markup — same dollars, two very different percentages. Retailers often work in markup ('keystone' pricing is a 100% markup, which is only a 50% margin), so if you treat a markup figure as your margin you will under-price every single time. Pick the one you mean and be consistent.
A worked example
Say you sell apparel and buy a jacket for $24 before sales tax, then sell it for $80. Your gross profit is $56, which is a 70% margin (56 ÷ 80) and a 233% markup (56 ÷ 24). If your supplier bumps the cost to $30, holding the $80 price drops the margin to about 63% — a cost increase chews through margin much faster than it dents the sticker price. Watching both figures side by side keeps you from drifting into under-pricing without noticing.
Common mistakes to avoid
Most margin mistakes trace back to comparing numbers that were never put on the same footing.
- Confusing margin with markup and pricing off the markup figure as if it were margin — this quietly under-prices every sale.
- Including sales tax in your revenue; it is a pass-through you remit to the state, not income, so use pre-tax figures.
- Treating gross margin as profit — it only covers cost of goods sold, not rent, payroll, marketing or other operating expenses.
- Pairing a pre-tax cost with a tax-inclusive selling price, which makes the margin look better than it is.
Sales tax and the US picture
Sales tax in the US is collected from the customer and remitted to the state or local jurisdiction, so it is never part of your revenue or your margin. Always enter pre-tax figures here, or your gross margin will read higher than reality. Rates and rules vary by state and even by city, and some states have no sales tax at all, but for margin purposes the principle is the same everywhere: strip the tax out first.
Keep in mind that a healthy gross margin is not the same as a profitable company. After you have the margin, the real question is whether it covers operating expenses — payroll, rent, software, marketing — and still leaves an operating and net profit. Treat the figure here as the top of the funnel and work down from there.
Related calculators
Frequently asked questions
Margin vs markup — what's the practical difference?▾
Margin divides profit by revenue; markup divides profit by cost. A $40 profit on a $100 sale (cost $60) is a 40% margin and a ~67% markup. Same dollars, two ways of expressing the spread. Retail uses markup ('keystone' = 100% markup = 50% margin); accounting reports margin. Don't apply a margin number where you mean markup — you'll under-price every time.
Is this gross margin or operating margin?▾
Gross. The formula is (revenue − COGS) / revenue, deducting only the direct cost of what you sold. Operating margin is gross profit minus operating expenses (salaries, rent, marketing, R&D); net margin further deducts interest and tax. A healthy 40% gross margin might still leave a 5–10% net margin once overhead is paid.
What's a normal margin in my industry?▾
It varies enormously. SaaS: 70–85% gross margin. Restaurants: ~70% on food, far less after labor. Grocery: 20–30%. Apparel retail: 50–60%. Auto manufacturing: 15–25%. Compare to your industry's median (NYU's Damodaran data is a public source) before deciding whether your margin is healthy.
Does this account for sales tax?▾
No — enter pre-tax figures. Sales tax in the US is a pass-through: you collect it from the customer and remit it to the state, so it's neither revenue nor a cost. If you accidentally include sales tax in your revenue figure, your gross margin will look slightly higher than it really is.
How do I price for a target margin?▾
Price = cost / (1 − margin%/100). For 40% target margin on $60 cost: 60 / 0.60 = $100. The Markup Calculator handles the same problem from the other direction (cost + target markup → price).