The gross margin formula
Gross margin = gross profit ÷ revenue × 100
Cost of goods sold (COGS) is the direct cost of the products or services you sold: materials, inventory you bought to resell, and the labor that goes straight into making them. It doesn't include rent for the office, marketing, or management salaries. Those are operating expenses. The SEC's beginners' guide to financial statements notes that gross profit is sometimes itself called "gross margin", and it's called "gross" because other expenses haven't been taken out yet.
Worked example
A store sells $200,000 of goods in a year. Those goods cost it $120,000.
- Gross profit = $200,000 − $120,000 = $80,000
- Gross margin = $80,000 ÷ $200,000 × 100 = 40%
So 40 cents of every sales dollar is left to pay for everything else. If its operating expenses are $50,000, its operating profit is $30,000.
Gross, operating and net margin
| Margin | Formula | Example |
|---|---|---|
| Gross margin | (revenue − COGS) ÷ revenue | $80,000 ÷ $200,000 = 40% |
| Operating margin | operating profit ÷ revenue | $30,000 ÷ $200,000 = 15% |
| Net margin | net income ÷ revenue | after interest and tax |
The operating profit margin formula
Operating profit = revenue − COGS − operating expenses
Operating profit is the profit "before interest and income tax expenses", as the SEC guide puts it, and the operating margin compares it with revenue. It's close to EBIT, which the EBIT calculator works out along with EBITDA.
Gross margin vs markup
Margin divides the profit by the selling price; markup divides it by the cost. Buying for $60 and selling for $100 is a 40% margin but a 66.7% markup. Mixing them up is the most common pricing mistake. The profit margin calculator converts between them and finds the price for a target margin.
What is a good profit margin?
It depends almost entirely on the industry. A grocery store and a software company run on completely different economics, so there's no single "good" number. NYU Stern professor Aswath Damodaran publishes margins by industry for US companies. These are from his data as of January 2026:
| Industry (US) | Gross margin | Operating margin* | Net margin |
|---|---|---|---|
| Software (System & Application) | 71.72% | 32.98% | 25.49% |
| Drugs (Pharmaceutical) | 71.73% | 29.54% | 18.54% |
| Restaurant/Dining | 32.24% | 15.79% | 9.37% |
| Homebuilding | 22.70% | 12.57% | 9.47% |
| Retail (General) | 33.18% | 6.80% | 5.61% |
| Retail (Grocery and Food) | 26.31% | 2.29% | 1.32% |
| Auto & Truck | 10.41% | 2.32% | 1.29% |
| Total market | 37.76% | 12.82% | 9.74% |
| Total market (without financials) | 34.39% | 13.14% | 8.56% |
*Pre-tax unadjusted operating margin, as labeled in the dataset. Figures are aggregates for publicly traded US companies, so small private businesses can differ a lot.
Two patterns stand out. First, high gross margins don't guarantee high profits: general retailers keep about a third of sales after the cost of goods, but less than 7% after running the stores. Second, low-margin businesses like grocery stores survive on volume and fast-turning inventory. A better test than any single number is your own trend over time and how you compare with businesses like yours.
Reading the three margins together
Each margin points to a different part of the business. A falling gross margin means the products themselves are earning less: costs rose, prices fell, or the mix shifted toward cheaper items. A steady gross margin with a falling operating margin points to overhead growing faster than sales. A gap between operating and net margin comes from interest and tax, which depend on how the business is financed rather than how well it runs. Looking at all three over several years tells you far more than any one figure.
How to improve gross margin
- Raise prices where customers value what you sell.
- Cut the direct cost: negotiate with suppliers, reduce waste and returns.
- Shift your sales mix toward higher-margin products.
Limitations
What goes into COGS can differ between companies, so compare margins only when costs are counted the same way. And a margin is a percent: a lower-margin product that sells far more can still bring in more profit dollars. Check how many units you need to sell with the break-even calculator.