Gross Margin Calculator
Calculate gross profit, gross margin and markup, or the price you need for a target margin
You keep 40.0% of every sales dollar as gross profit
Results
What is Gross Margin?
Gross margin is the share of revenue left after paying the direct cost of the goods or services you sold. It shows how much each sales dollar contributes toward overheads and profit. This gross margin calculator works out gross profit, gross margin and markup from revenue and cost of goods sold, and can also tell you the selling price you need to reach a target margin.
Gross margin formula
Example: a shop sells $50,000 of goods that cost it $30,000. Gross profit is $20,000 and the gross margin is $20,000 / $50,000 = 40%. To keep that 40% margin on a new product that costs $30, price it at $30 / (1 - 0.40) = $50.
Cost of goods sold includes only direct costs: materials, purchase cost of stock, and the labor that goes into making or delivering the product. Rent, marketing and office salaries are operating expenses and come out later, on the way to operating and net profit.
Gross margin vs. markup
Margin and markup describe the same gross profit from different starting points. Margin is a percentage of the selling price; markup is a percentage of the cost.
Example: an item costs $60 and sells for $100. Gross profit is $40, so the margin is 40% and the markup is $40 / $60 = 66.7%. A common pricing mistake is adding a 40% markup when you want a 40% margin: $60 × 1.4 = $84, which is only a 28.6% margin.
What is a good gross margin by industry
Gross margins vary widely by industry, because some businesses carry high direct costs and others almost none. The ranges below are typical ranges for U.S. companies, not benchmarks or targets. They are rounded around the January 2026 sector averages published by NYU Stern professor Aswath Damodaran, and individual businesses often sit well outside them.
| Industry | Typical range | U.S. sector average |
|---|---|---|
| Software | 70–80% | 71.7% |
| Pharmaceuticals | 65–80% | 71.7% |
| Apparel | 50–60% | 56.9% |
| Soft drinks | 50–60% | 54.7% |
| General retail | 25–40% | 33.2% |
| Restaurants | 25–40% | 32.2% |
| Grocery | 20–30% | 26.3% |
| Engineering & construction | 10–20% | 15.5% |
| Auto manufacturing | 8–15% | 10.4% |
The average across all U.S. companies in the same dataset is about 38%. A margin that is low for your industry can point to pricing that is too low or costs that are too high; a falling margin over time is often a more useful warning than the level itself. To see how margin changes affect future profit, use the Profit Growth & Margin Calculator.
Tips for Best Results
- Use the same period for both numbers: Revenue and cost of goods sold should cover the same month, quarter or year.
- Price from margin, not markup: If you have a margin target, use the selling price mode instead of adding the target percentage to cost.
- Include all direct costs: Shipping to customers, packaging and payment fees are often left out of cost of goods sold, which overstates margin.
- Check margin by product: A healthy overall margin can hide products that sell at a loss. Run the calculator per product line.
Frequently Asked Questions
How do you calculate gross margin?
Subtract the cost of goods sold from revenue to get gross profit, then divide gross profit by revenue and multiply by 100. With $50,000 of revenue and $30,000 of cost of goods sold, gross profit is $20,000 and the gross margin is $20,000 / $50,000 = 40%.
What is the difference between gross margin and markup?
Both use the same gross profit, but gross margin divides it by the selling price and markup divides it by the cost. An item that costs $60 and sells for $100 has a 40% gross margin and a 66.7% markup. Margin can never reach 100%; markup can be any size.
How do I price a product for a specific margin?
Divide the cost by 1 minus the target margin. To make a 40% margin on an item that costs $30, charge $30 / (1 - 0.40) = $50. Adding 40% to the cost instead gives $42, which is only a 28.6% margin.
Is gross margin the same as profit margin?
No. Gross margin only subtracts the direct cost of the goods sold. Operating margin also subtracts overheads such as rent, salaries and marketing, and net profit margin subtracts everything, including interest and taxes. Gross margin is always the highest of the three.
What is a good gross margin?
It depends on the industry. Software and pharmaceutical companies often keep 70% or more of revenue as gross profit, general retailers around 25–40%, and grocers and car makers far less. Compare your margin with businesses like yours, and track whether it rises or falls over time.
Sources
- SEC - Beginners' Guide to Financial Statements
- Corporate Finance Institute - Gross Margin Ratio
- NYU Stern (Aswath Damodaran) - Margins by Sector (US)
Last verified:
Related Calculators
Profit Growth & Margin Calculator
Project profit growth and profit margin expansion over time
Revenue Growth Calculator
Project business revenue growth over time
Sales Growth Calculator
Calculate sales unit and revenue growth
Percentage Increase Calculator
Find the percentage increase or decrease between two numbers, or raise a price by a percentage
Business Valuation Growth Calculator
Project business valuation based on revenue multiples
Startup Runway Calculator
Calculate cash runway and breakeven timing