How to Calculate Gross Profit: Formula & Examples

Gross profit equals your total revenue minus the cost of goods sold (COGS). The formula is simple: Gross Profit = Net Sales − Cost of Goods Sold. What takes more effort is knowing exactly which costs belong in that COGS number and which ones don’t. Get it wrong and you’ll overstate or understate how much money your business actually makes from its core operations.

The Formula and What Each Part Means

Start with your net sales. This is total revenue from sales during a given period, minus any returns, allowances, or discounts. If you sold $500,000 worth of product but customers returned $20,000 and you gave $5,000 in discounts, your net sales are $475,000.

Then subtract your cost of goods sold. COGS captures the direct costs of producing or acquiring whatever you sell. For a manufacturer, that includes raw materials, direct labor (the workers who build or assemble the product), manufacturing supplies, factory utilities, production equipment depreciation, factory rent, and freight costs tied to production or inventory. For a retailer, it’s primarily the wholesale cost of the merchandise you resell, plus inbound shipping.

If your net sales are $475,000 and your COGS is $285,000, your gross profit is $190,000. That $190,000 is the money left over to cover your operating expenses, taxes, and profit after you’ve paid for what it took to make or buy the goods.

COGS for Service Businesses

Service companies don’t sell physical products, but they still have direct costs. Instead of raw materials and factory rent, a service business tracks things like wages for staff who deliver the service, travel expenses for client work, client-facing workspace costs, and equipment used in service delivery. A consulting firm, for example, would include consultant salaries and travel to client sites in its cost of sales, but not the salary of its office manager or its general marketing budget.

The principle is the same regardless of industry: include costs that are directly tied to delivering what you sell. Exclude everything else.

What to Exclude from COGS

One of the most common mistakes is lumping indirect costs into COGS. Gross profit only reflects costs directly tied to production or service delivery. These expenses belong below the gross profit line, in the category accountants call selling, general, and administrative (SG&A) expenses:

  • Administrative salaries for executives, HR, accounting, and office staff not involved in production
  • Marketing and advertising costs
  • General office expenses like corporate office rent, office supplies, and software subscriptions unrelated to production
  • Corporate overhead for the non-production side of the business

If you accidentally include your marketing spend or CEO salary in COGS, your gross profit will look artificially low. Those costs matter for calculating operating income and net income, but they don’t belong in the gross profit calculation.

Turning Gross Profit Into a Percentage

A dollar figure for gross profit is useful, but converting it to a percentage (gross profit margin) makes it easier to compare across time periods, products, or competitors of different sizes. The formula:

Gross Profit Margin = (Net Sales − COGS) / Net Sales

Using the earlier example: ($475,000 − $285,000) / $475,000 = 0.40, or 40%. That means for every dollar of revenue, you keep 40 cents after covering direct production costs.

Tracking this percentage over time reveals trends. If your margin drops from 40% to 33% over two quarters, either your costs are rising or your pricing power is slipping. Companies use gross profit margin to pinpoint where to cut costs, adjust pricing, or renegotiate supplier contracts.

What a “Good” Margin Looks Like

There’s no universal target. Gross profit margins vary enormously by industry because of fundamental differences in cost structures. Based on January 2026 data compiled by NYU Stern, here’s what typical margins look like across sectors:

Software companies operate at the high end. System and application software averages about 72%, and entertainment software sits around 66%. The marginal cost of distributing one more copy of software is nearly zero, which drives those high margins.

Retail margins are much tighter. General retail averages roughly 33%, grocery and food retail about 26%, and automotive retail around 22%. These businesses deal with physical inventory, thin markups, and intense competition.

Manufacturing falls somewhere in between, with wide variation. Semiconductor companies average about 59%, while auto and truck manufacturers run closer to 10%. Steel producers sit around 12%, and machinery makers average about 37%.

Comparing your margin to your specific industry average tells you far more than comparing it to businesses in unrelated sectors. A 25% margin would be excellent for a grocery retailer and deeply concerning for a software company.

A Quick Example Start to Finish

Say you run a small furniture workshop. In a given quarter:

  • Total sales: $120,000
  • Returns and discounts: $4,000
  • Net sales: $116,000
  • Wood and materials: $32,000
  • Workshop employee wages: $28,000
  • Shop rent and utilities: $6,000
  • Equipment depreciation: $2,000
  • COGS total: $68,000

Gross profit: $116,000 − $68,000 = $48,000. Gross profit margin: $48,000 / $116,000 = 41.4%.

Your office manager’s salary, your website hosting, and the ad you ran in a local magazine would all come out of that $48,000 as operating expenses, but they don’t affect the gross profit number itself. Gross profit isolates how efficiently you turn raw inputs into finished goods, separate from how much it costs to run the rest of the business.

Post navigation