Gross Profit Margin: Definition, Formula, and Calculation

Gross profit margin is the share of revenue a business keeps after paying the direct costs of producing what it sold, expressed as a percentage. The formula is simple: subtract cost of goods sold (COGS) from revenue, divide by revenue, and multiply by 100. A company with $500,000 in revenue and $300,000 in production costs has a gross profit margin of 40 percent, meaning it keeps 40 cents of every dollar before paying overhead, non-production salaries, interest, or taxes.

That number tells you whether your core product economics work. Everything else on the income statement (rent, marketing, administrative pay, debt service, taxes) has to fit inside the gap between revenue and COGS. If the gap is too narrow, no amount of expense discipline further down will save the business.

How to Calculate It

You need two figures from your income statement: net sales and cost of goods sold. Net sales is total revenue after customer returns, discounts, and allowances. COGS is every expense directly tied to producing the units you sold.

Do the math in two steps. Subtract COGS from net sales to get gross profit in dollars. Then divide gross profit by net sales and multiply by 100.

A worked example: a furniture company reports $800,000 in net sales for the quarter. Its wood, hardware, factory labor, and equipment depreciation total $520,000. Gross profit is $280,000. Divide $280,000 by $800,000, multiply by 100, and the gross profit margin is 35 percent. That 35 percent is what the company has left to cover corporate rent, marketing salaries, and everything else before it reaches net income.

What Belongs in Cost of Goods Sold

The margin is only as accurate as your COGS figure, and COGS is where most classification errors happen. Three categories of cost belong in it.

Raw materials come first. For a bakery that’s flour, sugar, and butter; for a manufacturer, steel, plastic, or electronic components. If you resell finished goods, the invoice price minus trade discounts plus inbound shipping counts here.

Direct labor belongs in COGS too. These are wages paid to people whose work physically creates or assembles the product: assembly line workers, machine operators, freelancers hired for a specific production job. The salary of your accountant or office manager does not qualify. Misclassifying an administrative salary as direct labor inflates COGS and understates your margin.

Manufacturing overhead rounds it out: factory utilities, equipment depreciation, production facility rent. A useful test is whether the cost would disappear if you stopped producing. If yes, it generally belongs in COGS.

What stays out: selling expenses, administrative salaries, marketing, corporate office rent, interest, and income taxes. Those hit operating margin and net margin, not gross margin.

Service businesses can compute gross margin too, using direct labor for billable work in place of raw materials. The IRS generally requires businesses to account for inventories when “the production, purchase, or sale of merchandise” is an income-producing factor, though small business taxpayers with average annual gross receipts of $31 million or less over the prior three tax years can skip formal inventory accounting if their method clearly reflects income.

COGS also has tax consequences. Corporations, S-corps, and partnerships report it on Form 1125-A; sole proprietors use Part III of Schedule C.1Internal Revenue Service. Form 1125-A, Cost of Goods Sold2Internal Revenue Service. Instructions for Schedule C (Form 1040) A substantial understatement of income can trigger an accuracy-related penalty equal to 20 percent of the underpayment.3Office of the Law Revision Counsel. 26 USC 6662 – Imposition of Accuracy-Related Penalty on Underpayments

Gross Margin Is Not Markup

Mixing up margin and markup is one of the most common pricing mistakes, and it can quietly erode profitability for months. Both use the same dollar profit, but they divide it by different bases.

Gross margin divides profit by the selling price. Markup divides profit by the cost. Say you sell a product for $100 and it costs $70 to make. Profit is $30 either way. Your gross margin is 30 percent ($30 divided by $100). Your markup is about 43 percent ($30 divided by $70).

The gap widens at higher margins. A 50 percent gross margin corresponds to a 100 percent markup. An owner who sets prices with a 40 percent markup thinking it delivers a 40 percent margin is actually running at about 29 percent. Over a year, that 11-point gap can be the difference between covering overhead and losing money. Before setting a price, be certain which number you’re working with.

How Inventory Accounting Shifts the Number

Two businesses with identical sales and identical purchase prices can report different gross margins simply because they use different inventory methods. The method controls which unit costs flow into COGS.

Under FIFO (first-in, first-out), the oldest inventory costs are assigned to the units sold. Under LIFO (last-in, first-out), the most recent costs go to COGS first. When prices are rising, FIFO puts cheaper old costs into COGS, producing a lower COGS and a higher gross margin. LIFO does the opposite: newer, higher costs go to COGS, and the margin shrinks.4Internal Revenue Service. Publication 538 – Accounting Periods and Methods

A quick illustration. You bought 100 units in January at $10 each and 100 more in February at $12 each. You sell 120 units in March. Under FIFO, COGS is $1,240 (all 100 January units at $10 plus 20 February units at $12). Under LIFO, COGS is $1,400 (all 100 February units at $12 plus 20 January units at $10). That $160 difference goes straight through to gross profit.

LIFO is permitted under U.S. tax law by election.5Office of the Law Revision Counsel. 26 USC 472 – Last-In, First-Out Inventories Companies reporting under International Financial Reporting Standards cannot use it. When you compare gross margins across companies, or across years for the same company, check whether the inventory method changed. A margin improvement caused by a method switch is not an operational gain.

What Counts as a Good Gross Profit Margin

There is no universal good number. Cost structures vary enormously by industry, so a margin that signals strength in one sector would be alarming in another. Software firms carry almost no per-unit material cost and routinely post margins above 60 percent. Grocery retailers move low-cost commodities in high volume against fierce price competition, so their margins are thin by design.

Based on January 2026 data across publicly traded U.S. companies, representative sector benchmarks include:

  • Software (system and application): 71.72%
  • Pharmaceuticals: 71.73%
  • Software (entertainment): 66.45%
  • Semiconductors: 58.97%
  • Apparel: 56.88%
  • Household products: 51.04%
  • Computers and peripherals: 38.36%
  • Restaurant and dining: 32.24%
  • Retail (grocery and food): 26.31%
  • Auto and truck: 10.41%

These are averages, and individual companies within a sector can sit well above or below them.6NYU Stern. Margins by Sector (US) The more useful exercise is tracking your own margin over time. A stable or rising margin suggests you’re controlling production costs or successfully raising prices. A margin that drops for several consecutive quarters means costs are outpacing what you can charge.

Lenders and investors watch for consistency. A business that swings from 45 percent to 25 percent and back raises questions about cost management or exposure to volatile inputs. A company that holds steady at 30 percent, even if that’s modest for its industry, reads as predictable, which is what most capital providers want.

Where Gross Margin Fits Alongside the Other Profitability Metrics

Gross margin is the first of three profitability ratios, and each one strips away another layer of cost. Knowing where it sits keeps you from over-reading a single number.

Operating margin picks up where gross margin ends. Take gross profit, subtract the costs of running the business (corporate rent, marketing, administrative salaries, legal fees, research spending), and divide the result by revenue. A company with a healthy gross margin and a razor-thin operating margin is spending too much on overhead relative to its sales.

Net margin is the bottom line. It accounts for production costs, operating expenses, interest, taxes, and any one-time charges. If operating margin is positive but net margin is negative, the drag is usually interest expense or a nonrecurring item.

A company can post a 65 percent gross margin and still lose money if its overhead is bloated or its debt load is heavy. Gross margin tells you whether the product itself makes economic sense. The other two tell you whether the full business model does. Experienced analysts read all three together.