
Shashank D Shastry
Shashank is an SEO Content Specialist at G2 with over six years of experience in the B2B SaaS space. He tests and reviews tools across different software categories to create a diverse mix of content. His goal is to demystify G2 Data into clear, actionable insights for buyers navigating their software purchase decisions. When he's not working, he's likely checking out a critically acclaimed piece of pop culture or trying a new health fad.
TL;DR: How to calculate gross profit
- What is gross profit? Revenue minus cost of goods sold (COGS). It shows what’s left from sales after you pay the direct costs of making or buying what you sold.
- How do you calculate gross profit? Subtract COGS from net revenue. A company with $5.6 million in revenue and $4.2 million in COGS has a gross profit of $1.4 million.
- What is the gross profit margin formula? Divide gross profit by revenue, then multiply by 100. That same company’s $1.4 million on $5.6 million of revenue is a 25% margin.
- What counts as COGS? Direct costs such as materials, freight-in, and, for manufacturers, direct labor. Office rent, marketing, and administrative salaries are operating expenses, not COGS.
- How is gross profit different from net profit? Net profit also subtracts operating expenses, interest, and taxes, so it’s usually much lower than gross profit.
- What is a good gross margin? It depends on the industry. Software companies keep far more of each sale than grocers or contractors, so compare yourself with peers, not a single target.
- How can you raise gross profit? Raise prices, lower direct costs, or shift sales toward higher-margin products.
- How do you track gross profit automatically? Accounting software that records revenue and COGS in the general ledger shows gross profit on the income statement.
Gross profit is the first profit figure on an income statement, and it tells you whether your products or services earn more than they cost to deliver. Calculating it takes two numbers, revenue and cost of goods sold (COGS), and one subtraction.
This guide covers how to calculate gross profit, the gross profit formula, a worked example with a full COGS build-up, and the gross margin percentage that makes the number comparable across periods and competitors. It also explains what belongs in COGS, how gross profit differs from net profit, and where accounting software fits in when you want these figures without rebuilding a spreadsheet every month.
What is gross profit?
Gross profit is the money a company keeps from sales after subtracting the cost of goods sold (COGS), the direct costs of producing or buying what it sold. It equals revenue minus COGS and appears near the top of the income statement, above operating expenses, interest, and taxes.
Because it stops at COGS, gross profit shows the economics of the product or service itself, not the cost of running the company. A business can report strong gross profit and still lose money if marketing, payroll, and rent outrun it.
Gross profit is a dollar amount. Gross margin expresses the same figure as a percentage of revenue, which makes it easier to compare periods and companies of different sizes.
How do you calculate gross profit?
You need two numbers from your income statement or general ledger: net revenue and COGS. Net revenue is total sales minus returns, discounts, and allowances.
What is the gross profit formula?
Gross Profit = Revenue − Cost of Goods Sold (COGS)
Here’s a quick example. Company A recorded $5.6 million in revenue and $4.2 million in COGS for the year.
$5.6 million − $4.2 million = $1.4 million gross profit
How do you calculate COGS before gross profit?
Businesses that hold inventory work out COGS from their inventory records. The formula follows the one in an IRS fact sheet on cost of goods sold:
Cost of Goods Sold (COGS) = Beginning inventory + Purchases + Direct labor + Materials and supplies + Other costs − Ending inventory
Subtracting ending inventory matters because COGS counts only the goods you sold, not everything you bought. Your inventory method, such as FIFO or LIFO, changes the cost assigned to ending inventory and therefore changes COGS. G2’s guide to calculating cost of goods sold walks through each method.
What does a full gross profit calculation look like?
Take a small manufacturer with $480,000 in net revenue for the year. Its inventory and cost records show the following.
| Line item | Amount |
|---|---|
| Beginning inventory | $60,000 |
| Plus: purchases | $210,000 |
| Plus: direct labor | $45,000 |
| Less: ending inventory | $55,000 |
| Cost of goods sold | $260,000 |
| Net revenue | $480,000 |
| Gross profit | $220,000 |
| Gross margin | 45.8% |
COGS: $60,000 + $210,000 + $45,000 − $55,000 = $260,000
Gross profit: $480,000 − $260,000 = $220,000
Want to learn more about Accounting Software? Explore Accounting products.
How do you calculate gross profit margin?
Gross margin, also called gross profit margin, is calculated by dividing gross profit by revenue. Multiply the result by 100 to express it as a percentage.
Gross Profit Margin (%) = (Gross Profit ÷ Revenue) × 100
Company A: ($1.4 million ÷ $5.6 million) × 100 = 25%
The manufacturer: ($220,000 ÷ $480,000) × 100 = 45.8%
A 45.8% margin means the manufacturer keeps about 46 cents of every sales dollar after direct costs. The other 54 cents covers COGS.
What is the difference between gross profit, gross margin, and net profit?
Gross profit and gross margin describe the same result in dollars and in percent. Net profit goes further and subtracts every other cost. Assume the manufacturer above also has $150,000 in operating expenses, $5,000 in interest, and $12,000 in taxes.
| Metric | Formula | Result for the manufacturer | What it shows |
|---|---|---|---|
| Gross profit | Revenue − COGS | $220,000 | Money left after direct costs |
| Gross margin | Gross profit ÷ Revenue × 100 | 45.8% | Share of each sales dollar left after direct costs |
| Operating profit | Gross profit − Operating expenses | $70,000 (14.6% margin) | Profit from running the business, before interest and taxes |
| Net profit | Operating profit − Interest − Taxes | $53,000 (11.0% margin) | What the company keeps after all costs |
Operating profit: $220,000 − $150,000 = $70,000
Net profit: $70,000 − $5,000 − $12,000 = $53,000
Net margin: $53,000 ÷ $480,000 = 11.0%
All four figures sit on the income statement. G2’s income statement example shows where each line appears.
What counts as COGS, and what stays out?
COGS covers costs tied directly to producing or buying the goods you sold. Operating expenses cover the cost of running the company no matter how much you sell. As the IRS fact sheet notes, labor is usually part of COGS only in manufacturing or mining, and small merchandisers such as retailers and wholesalers usually have no labor to charge to it.
| Usually in COGS | Usually operating expenses |
|---|---|
| Raw materials and purchased inventory | Marketing and advertising |
| Freight-in on inventory purchases | Administrative and sales salaries |
| Direct labor (manufacturers) | Office rent, utilities, and insurance |
| Production supplies and containers | Third-party consulting fees |
Treatment can vary by industry and accounting policy, so confirm borderline costs with your accountant before you lock in your categories.
How do you calculate gross profit for a service or software business?
A business that sells time or expertise usually holds no inventory, so there’s no inventory-based COGS to subtract. Many service firms still track the direct cost of delivering the work, such as contractor fees billed to a client, so they can compare margin by project.
Software companies typically count hosting and customer support in COGS. Their gross margins run well above those of product businesses, as the benchmarks below show.
Why does gross profit matter?
Gross profit tells you whether your prices cover what it costs to deliver your product or service, before any overhead enters the picture. It also shows whether growth is paying off.
Rising gross profit doesn’t always mean the business is getting more efficient. Suppose a company earns $400,000 of gross profit on $1,000,000 of revenue in year one, a 40% margin. In year two, it earns $510,000 on $1,500,000, a 34% margin.
Gross profit rose by $110,000 ($510,000 − $400,000), yet the margin fell by 6 percentage points (40% − 34%). That pattern points to rising costs or heavier discounting, which is why the dollar figure and the margin belong side by side.
What is a good gross margin?
There’s no single target, because cost structures differ by industry. NYU Stern professor Aswath Damodaran’s margins by sector dataset of US public companies, updated in January 2026, shows the spread.
| Industry | Gross margin |
|---|---|
| Software (system and application) | 71.7% |
| All US public companies, excluding financials | 34.4% |
| Retail (grocery and food) | 26.3% |
These are public companies, which are larger than most small businesses, so treat the figures as reference points. The more useful comparison is your own margin against direct competitors and against your own past quarters.
How can you increase gross profit?
You can raise gross profit in three ways: charge more, spend less on direct costs, or sell more of what carries a higher margin. Each has a trade-off.
- Raise prices: Selling a product that costs $60 for $110 instead of $100 lifts gross profit per unit from $40 to $50 and the margin from 40% to 45.5%. The risk is that customers find cheaper options elsewhere, and prices set too high can cost you sales quickly.
- Reduce direct costs: Cutting that $60 cost to $55 at a $100 price raises the margin to 45%. Cheaper materials or shortcuts in production can lower quality, though, which can hurt customer satisfaction and your reputation over time.
- Shift your sales mix: Promote the products or service lines with the highest margins, and review the lowest-margin items for repricing or removal.
Tip: Recalculate margin after every discount. Cutting a $100 price by 10% on a product that costs $60 drops gross profit per unit from $40 to $30, a 25% decline from a 10% price cut.
Which accounting software calculates gross profit automatically?
Accounting software records revenue and COGS in the general ledger and reports both on the income statement, so you don’t rebuild the calculation in a spreadsheet every month. The result is only as accurate as your categories, so set up your COGS accounts before you start.
Best accounting software on G2:
These are products from G2’s Accounting Software category, listed by G2 rating. Ratings reflect G2 user reviews.
-
FreshBooks
Best for: Freelancers and service businesses that want billing, books, and payroll on one platform, with project profitability reporting.
G2 rating: 4.5/5 -
Xero
Best for: Small businesses and accounting firms that want automated bank reconciliation and a large library of third-party app integrations.
G2 rating: 4.4/5 -
Zoho Books
Best for: Growing businesses that want detailed built-in reporting plus customer and vendor portals.
G2 rating: 4.4/5 -
NetSuite
Best for: Mid-sized and larger companies that need accounting alongside inventory and order management in one ERP platform.
G2 rating: 4.1/5 -
QuickBooks Online
Best for: Small businesses that want one cloud tool for everyday bookkeeping and reporting.
G2 rating: 4.0/5
Frequently asked questions about gross profit
Got more questions? Here are the answers.
Q. How do you calculate gross profit percentage?
Divide gross profit by revenue and multiply by 100. If a shop has $80,000 in revenue and $52,000 in COGS, gross profit is $28,000, and the percentage is ($28,000 ÷ $80,000) × 100 = 35%.
Q. Does gross profit include labor?
Only direct labor, and mostly for manufacturers. Labor that physically makes the product counts toward COGS. Salaries for administrative, sales, and marketing staff are operating expenses and never reduce gross profit.
Q. Can gross profit be negative?
Yes. If COGS exceeds revenue, gross profit is negative. A company with $50,000 in revenue and $58,000 in COGS has a gross profit of −$8,000, a −16% margin. It means products are selling for less than they cost to make or buy, so pricing or costs need attention.
Q. What is the difference between markup and gross margin?
Both start from the same profit, but markup divides by cost and margin divides by revenue. A product that costs $60 and sells for $100 earns $40. The markup is $40 ÷ $60 = 66.7%, and the gross margin is $40 ÷ $100 = 40%. Mixing the two up leads to underpricing.
Q. How do you calculate gross profit on a single product?
Subtract the unit cost from the selling price. At a $100 price and a $60 unit cost, gross profit is $40 per unit, so selling 100 units produces $4,000 in gross profit.
Turning gross profit into a number you track
Gross profit takes one subtraction, but the result depends on counting COGS correctly and applying the same rules every period. Calculate the dollar figure and the margin together, compare both against your past quarters and your industry, and investigate any quarter where profit rises while margin falls.
If you’re still building these reports by hand, G2’s list of the best free accounting software is a low-cost place to start.
This was originally written by Devin Pickell in 2020. It has been updated with new information.
