Gross Profit Calculator: Formula and Examples

Gross profit is revenue minus the cost of goods sold (COGS): Gross Profit = Revenue − COGS. For example, if you earn $10,000 in sales and your direct costs are $4,000, your gross profit is $6,000. Expressed as a margin, that is 60% of revenue, showing how much each sale contributes before overheads.
A gross profit calculator answers one of the most important questions in business: after you cover the direct cost of delivering what you sell, how much is actually left? It is the difference between revenue and the cost of goods sold, and it sits at the top of every profit-and-loss statement for a reason. If this number is healthy, you have room to pay your overheads, your taxes, and yourself. If it is thin, no amount of sales volume will save you.
This guide gives you the exact formula, explains every input in plain language, and walks through several fully worked examples with realistic figures. You will learn what a "good" gross profit looks like, when to use the metric, the mistakes that quietly distort it, and how it connects to pricing, cash flow, and the way you invoice. By the end, you will be able to calculate gross profit confidently for a product, a project, or an entire month.
What Is Gross Profit?
Gross profit is the money left over from sales once you subtract the direct costs of producing or delivering whatever you sold. It is sometimes called gross income or trading profit. Crucially, it does not include indirect costs like rent, software subscriptions, marketing, or your own salary - those come out later, on the way down to net profit.
Think of it as the first checkpoint of profitability. Revenue is the headline number, but it can be misleading. A freelancer billing $120,000 a year sounds successful, but if $70,000 of that goes to subcontractors and software licenses tied directly to client work, the real starting point is $50,000. Gross profit strips out the noise and shows what each sale genuinely contributes.
Because it isolates the relationship between price and direct cost, gross profit is the metric that tells you whether your pricing model works at all. Every other profitability layer builds on top of it.
The Gross Profit Formula
The formula is refreshingly simple:
Gross Profit = Revenue − Cost of Goods Sold (COGS)
That is the whole thing. Revenue is your total sales for a period or a transaction. COGS is the sum of the direct costs tied to generating that revenue. Subtract one from the other and you have your gross profit in currency terms.
To express it as a percentage - the gross profit margin - you divide gross profit by revenue and multiply by 100:
Gross Profit Margin (%) = (Gross Profit ÷ Revenue) × 100
Both versions matter. The currency figure tells you how many pounds or dollars you kept. The percentage tells you how efficiently you kept them, and it is the version you compare across products, periods, and competitors.
Understanding the Inputs
A calculator is only as good as the numbers you feed it. Two inputs drive everything: revenue and cost of goods sold. Getting them right is most of the work.
Revenue (Net Sales)
Revenue is the total value of goods or services you sold during the period, before any costs are deducted. Use net sales - that is, gross sales minus refunds, returns, and discounts you actually granted. Including refunded amounts inflates the top line and makes your margin look better than it is.
Where to find it: your invoicing or accounting software, your sales report, or the total of issued invoices for the period. If you use Aviy, your invoice analytics roll this up automatically, so the revenue figure you plug in is already net of credit notes.
Cost of Goods Sold (COGS)
COGS is the trickier input. It includes only the direct costs of producing or delivering what you sold. For a product business, that typically means raw materials, manufacturing labor, packaging, inbound freight, and the wholesale cost of items you resell. For a service business, it means the direct labor, subcontractors, and project-specific tools or licenses tied to client delivery.
What does not belong in COGS: rent, head-office salaries, general software, advertising, accounting fees, and your own draw if you are the owner. Those are operating expenses, deducted further down the income statement to reach operating and net profit.
Where to find it: your purchase records, supplier invoices, payroll allocated to production, and any expenses tagged as direct in your bookkeeping. Clean expense categorization is what makes COGS reliable.
Worked Examples
Numbers make this concrete. Here are three realistic scenarios, each calculated step by step.
Example 1: A Product Retailer
Maya runs a small online shop selling handmade candles. In one month she records the following:
- Net sales (revenue): $12,000
- Wax, wicks, and fragrance: $2,800
- Jars and packaging: $1,400
- Production labor (part-time maker): $1,800
Step 1 - Add up COGS: $2,800 + $1,400 + $1,800 = $6,000.
Step 2 - Apply the formula: Gross Profit = $12,000 − $6,000 = $6,000.
Step 3 - Calculate margin: ($6,000 ÷ $12,000) × 100 = 50%.
Maya keeps $0.50 of every $1 of sales before overheads. Half her revenue is consumed by direct costs, which is typical for a physical-product maker.
Example 2: A Freelance Web Designer
James is a freelance designer who took on three projects this month. He bills $9,000 in total. To deliver, he paid a contract developer $2,400, bought $300 in stock photography and plugin licenses for the projects, and used $150 of paid font and asset subscriptions tied to the work.
Step 1 - COGS: $2,400 + $300 + $150 = $2,850.
Step 2 - Gross Profit = $9,000 − $2,850 = $6,150.
Step 3 - Margin: ($6,150 ÷ $9,000) × 100 = 68.3%.
Note what James did not include: his laptop, his general Adobe subscription used across all work, his coworking desk, or his own time. Those are operating costs or owner's pay. His gross profit reflects only project-specific direct costs, which is why service margins tend to run higher than product margins.
Example 3: A Single Product Line
A startup sells a $40 gadget. Each unit costs $16 to source and $4 to ship to the customer. They sold 500 units this quarter.
Step 1 - Revenue: 500 × $40 = $20,000.
Step 2 - COGS per unit: $16 + $4 = $20. Total COGS: 500 × $20 = $10,000.
Step 3 - Gross Profit = $20,000 − $10,000 = $10,000.
Step 4 - Margin: ($10,000 ÷ $20,000) × 100 = 50%.
Per unit, gross profit is $40 − $20 = $20. Multiply by 500 and you reach the same $10,000. Calculating per unit is useful because it shows you the contribution of each additional sale and feeds directly into break-even analysis.
Example 4: A Monthly Roll-Up for a Small Agency
Sometimes you want gross profit for the whole business over a period rather than a single product. A small marketing agency closes its month with the following:
- Net sales across all clients: $48,000
- Freelance copywriters and designers hired for client projects: $14,000
- Paid media and ad spend billed through to clients: $6,500
- Project-specific software licenses and stock assets: $2,500
Step 1 - Total COGS: $14,000 + $6,500 + $2,500 = $23,000.
Step 2 - Gross Profit = $48,000 − $23,000 = $25,000.
Step 3 - Margin: ($25,000 ÷ $48,000) × 100 = 52.1%.
Notice how subcontractor-heavy agencies can land at a moderate margin despite strong revenue, because so much delivery cost is passed through. The agency's office rent, full-time staff salaries, and general tools are not in COGS - they come out of that $25,000 later to reach operating profit. This roll-up view is what you would plug into a monthly review, and it is exactly the kind of figure a dashboard can assemble for you automatically.
Gross Profit vs Gross Profit Margin
People use these terms loosely, but they answer different questions. Gross profit is an amount of money. Gross profit margin is a ratio. You need both to make good decisions, and confusing them leads to mispricing.
| Aspect | Gross Profit | Gross Profit Margin |
|---|---|---|
| What it is | Currency amount | Percentage of revenue |
| Formula | Revenue − COGS | (Gross Profit ÷ Revenue) × 100 |
| Tells you | How much you kept | How efficiently you kept it |
| Best for | Comparing total earnings | Comparing across products or periods |
| Example | $6,000 | 50% |
| Limitation | Hard to compare different sizes | Hides absolute scale |
A large project at a low margin and a small project at a high margin can produce the same gross profit. The margin tells you which model scales better; the absolute figure tells you which paid more this month. Track them side by side.
How to Interpret Your Result
Once you have a number, the question becomes: is it good? There is no universal answer, but there are useful reference points.
A higher gross profit margin means more of every sale survives to cover overheads and become profit. As a rough guide:
- Service and consulting businesses often run high gross margins, frequently 60-80% or more, because direct costs are mostly time rather than materials.
- Software and digital products can exceed 80% once built, because the marginal cost of an extra sale is tiny.
- Retail and ecommerce commonly land in the 30-50% range, with materials and shipping eating a large share.
- Manufacturing and food often sit lower, sometimes 20-35%, due to heavy material and production costs.
These are general ranges, not targets. The right benchmark is your own industry and your own trend over time. A margin that is stable or rising is a healthy sign; a margin that is slipping quarter over quarter is an early warning that costs are creeping up or prices have fallen behind.
The absolute gross profit number matters too. A 70% margin is meaningless if your total revenue is too small to cover your living costs. You need enough gross profit pounds, not just an attractive percentage.
Reading the Trend, Not the Snapshot
A single gross profit figure is a photograph; the trend is the film. Suppose your margin reads 55% this month. On its own, that tells you very little. But if it was 62% three months ago and 58% last month, you are watching a steady erosion that demands attention. Conversely, a 45% margin that has climbed from 38% over a quarter is a story of improvement worth protecting.
When you see the margin moving, ask which side of the formula caused it. A falling margin with steady prices means direct costs are rising - perhaps a supplier raised prices or you are absorbing more shipping. A falling margin with rising costs you already knew about means you simply have not repriced yet. A rising margin might come from better supplier terms, smarter product mix, or a price increase that stuck. Diagnosing the cause is what turns the number into a decision.
Comparing Across Your Product Lines
If you sell more than one thing, a blended company margin can lull you into complacency. Imagine two products: one at a 70% margin selling slowly, and one at a 30% margin selling in volume. The blended figure might look acceptable, but it hides the fact that your busiest product is barely paying its way. Calculating gross profit per line forces this into the open and often reshapes where you put your marketing and attention.
When and Why to Use Gross Profit
Gross profit is not a once-a-year accounting chore. It is a working tool you should reach for in several recurring situations.
Pricing decisions. Before you quote a job or set a product price, calculate the gross profit it will produce. If a client wants a discount, the gross profit calculation shows you exactly how much margin you are giving away and whether the work is still worth doing.
Comparing products or services. When you offer several lines, gross profit margin reveals which ones actually earn their keep. The bestseller by volume is not always the best earner once you account for direct costs.
Spotting cost creep. If your gross profit margin falls while prices stay flat, your direct costs are rising. Catching this early lets you renegotiate with suppliers or adjust prices before it erodes your bottom line.
Planning growth. Gross profit is the fuel for everything else. If you want to hire, advertise, or invest, you are spending out of gross profit. Knowing the figure tells you how much room you genuinely have.
Pros and Cons of Using Gross Profit
Gross profit is powerful, but like any single metric it has blind spots. Knowing both sides keeps you from over-relying on it.
Pros:
- Simple and fast. One formula, two inputs. You can calculate it on the back of an envelope or in seconds inside your accounting software.
- Isolates pricing performance. Because it ignores overheads, it cleanly shows whether the gap between price and direct cost is healthy.
- Comparable across periods and lines. The margin percentage lets you benchmark fairly, regardless of business size.
- An early warning system. A slipping margin flags cost creep or underpricing before it reaches your bottom line.
- Foundation for other tools. It feeds break-even analysis, pricing decisions, and growth planning directly.
Cons:
- Ignores overheads entirely. A strong gross profit can still sit on top of a loss-making business if fixed costs are too high.
- Sensitive to cost classification. If you misclassify direct and indirect costs, the figure becomes misleading.
- Excludes owner time for service businesses. This can mask underpricing if you never value your own hours anywhere.
- Says nothing about cash timing. Strong gross profit with unpaid invoices still means a cash crunch.
- Industry-dependent. A "good" margin in software is a disaster in grocery retail, so comparisons need context.
Use gross profit as the first lens, then pair it with operating profit, net profit, and cash flow for the full picture.
Gross Profit for Service Businesses
Service businesses sometimes assume gross profit does not apply to them because they do not sell physical goods. It absolutely does - the concept just needs translating.
For a freelancer, consultant, or agency, COGS is the direct cost of delivering client work. That includes subcontractors and freelancers you hire for a specific project, project-specific software or licenses, and any direct labor you pay to fulfill the engagement. It does not include your own time as the owner, general overhead, or tools you use across all clients.
The practical effect is that service gross margins are usually high, because the biggest "cost" - your expertise - is not a cash outflow in COGS terms. This is exactly why pricing discipline matters so much for service businesses: the margin is generous, so leaving money on the table through underpricing hurts more than it would in a thin-margin product business.
If you subcontract heavily, watch your gross profit closely. An agency that passes most of the work to contractors can have a deceptively low gross margin despite high revenue, because COGS is large relative to sales.
Common Mistakes
Even with a simple formula, gross profit goes wrong in predictable ways. Avoid these.
- Putting operating expenses into COGS. Rent, general software, marketing, and admin salaries are not direct costs. Including them understates gross profit and confuses it with operating profit.
- Leaving direct costs out of COGS. The opposite error. Forgetting shipping, packaging, payment processing fees, or subcontractors inflates your margin and makes you think you are more profitable than you are.
- Using gross sales instead of net sales. Refunds, returns, and discounts must come out of revenue first. Otherwise your top line is fiction.
- Ignoring your own time entirely. Gross profit deliberately excludes owner pay, but if you never account for your time anywhere, you can run a "profitable" business that pays you nothing.
- Confusing margin with markup. A 50% markup on cost is not a 50% margin. Markup is profit over cost; margin is profit over revenue. They are different calculations and mixing them up wrecks pricing.
- Calculating it once and forgetting it. Gross profit is a trend metric. A single snapshot tells you little; the direction over months tells you everything.
Best Practices
Follow these steps to keep your gross profit accurate and actually useful.
- Define COGS clearly and stick to it. Write down which costs are direct and which are operating, then categorize consistently every time. Consistency is what makes the trend meaningful.
- Use net sales for revenue. Strip out refunds, returns, and granted discounts before you calculate.
- Calculate per product or service line. A blended company-wide margin hides your winners and losers. Break it down where you can.
- Track it monthly, not annually. Frequent calculation catches cost creep and pricing problems while you can still fix them.
- Compare margin and absolute profit together. Never make a decision on percentage alone or amount alone.
- Review pricing against margin regularly. When direct costs rise, your prices should usually follow. Let gross profit be the trigger.
- Automate the data collection. Pull revenue and direct costs from software that tracks them in real time rather than rebuilding spreadsheets by hand.
How Gross Profit Connects to Running Your Business
Gross profit is not an isolated metric - it is the hinge that connects pricing, cash flow, and growth.
On the pricing side, your gross profit margin is the direct result of the gap between what you charge and what delivery costs. Raise prices or cut direct costs and the margin widens; discount or absorb rising supplier costs and it narrows. Every quote you send is, in effect, a gross profit decision.
On the cash flow side, gross profit is what funds the rest of the income statement. Overheads, taxes, loan repayments, and your own pay all come out of it. A business with strong gross profit but weak cash flow usually has an invoicing or collections problem, not a profitability problem - the margin is there, but the money is stuck in unpaid invoices.
That is where your invoicing system earns its place. When you create invoices with Aviy's AI invoice generator, every sale is captured cleanly, refunds and credit notes are tracked, and your revenue figure stays accurate. Aviy's invoice analytics and business dashboard then surface revenue and trends in one place, so the "revenue" input for your gross profit calculation is always current and reliable. Clean data in means a trustworthy margin out.
Finally, gross profit feeds straight into break-even analysis and growth planning. Knowing your margin tells you how many sales you need to cover fixed costs and how much each new sale contributes. It is the foundation every other financial decision rests on.
Summary
A gross profit calculator boils down to one dependable formula: Revenue minus the cost of goods sold. Get your revenue net of refunds, get your COGS to include only direct costs, and the result tells you how much each sale contributes before overheads. Express it as a margin and you can compare across products, periods, and competitors.
Use it to price confidently, spot cost creep early, and decide which work is genuinely worth doing. Track it monthly, break it down by line, and watch the trend rather than a single snapshot. Avoid the classic mistakes - misclassified costs, gross-versus-net confusion, and mixing up margin with markup - and the number becomes one of the most reliable signals you have. Master gross profit and you have mastered the first and most important layer of profitability.
Frequently asked questions
What is the gross profit formula?
Gross profit equals revenue minus the cost of goods sold (COGS): Gross Profit = Revenue − COGS. Revenue is your net sales for the period, and COGS includes only the direct costs of producing or delivering what you sold. To turn it into a margin, divide gross profit by revenue and multiply by 100. Both the currency figure and the percentage are worth tracking together.
How do you calculate gross profit margin?
Gross profit margin is gross profit divided by revenue, multiplied by 100. So if your gross profit is $6,000 on $12,000 of sales, your margin is (6,000 ÷ 12,000) × 100 = 50%. The margin shows how efficiently you convert sales into profit before overheads, which makes it ideal for comparing products, periods, or your performance against industry benchmarks.
What is the difference between gross profit and net profit?
Gross profit subtracts only direct costs (COGS) from revenue. Net profit subtracts everything - direct costs plus all operating expenses like rent, marketing, salaries, and taxes. Gross profit sits at the top of the income statement and shows whether your pricing works; net profit sits at the bottom and shows whether the whole business is profitable. You need both to understand performance.
What counts as cost of goods sold?
COGS includes only the direct costs of producing or delivering what you sold: raw materials, manufacturing labor, packaging, inbound freight, resale stock, and project-specific subcontractors or licenses. It excludes indirect costs such as rent, general software, advertising, admin salaries, and owner's pay. Those are operating expenses deducted later. Clean categorization of direct versus indirect costs is essential for an accurate figure.
What is a good gross profit margin?
It depends on your industry. Service and consulting businesses often run 60-80% or higher, software can exceed 80%, retail and ecommerce typically land at 30-50%, and manufacturing or food may sit at 20-35%. These are general ranges, not targets. The best benchmark is your own trend over time - a stable or rising margin is healthy, while a declining one signals cost creep or underpricing.
How do service businesses calculate gross profit?
The same way: revenue minus direct delivery costs. For a freelancer or agency, COGS is subcontractors, project-specific software, and direct labor tied to client work. It excludes your own time, general tools, and overhead. Because the main "cost" - your expertise - is not a cash COGS item, service margins tend to be high, which makes disciplined pricing especially important.
How can I increase my gross profit?
You have two levers: raise revenue per sale or lower direct costs. Increase prices, reduce discounting, negotiate better supplier terms, cut waste, or shift toward higher-margin products and services. Even small improvements compound. Track your margin monthly so you can see whether a change actually moved the number, and review pricing whenever direct costs rise.
Is gross profit the same as gross margin?
They are closely related but not identical. Gross profit is a currency amount (Revenue − COGS). Gross margin, or gross profit margin, is that amount expressed as a percentage of revenue. People often use the terms interchangeably in conversation, but in financial reporting it is worth being precise: one is an amount, the other is a ratio.
Should I include shipping in COGS?
Inbound shipping - the cost to get goods or materials to you - is generally part of COGS because it is a direct cost of acquiring what you sell. Outbound shipping to customers is often treated as COGS for ecommerce too, since it is directly tied to fulfilling a sale. Be consistent in how you classify it so your margin stays comparable over time.
How often should I calculate gross profit?
Monthly is ideal for most small businesses, freelancers, and agencies. A monthly cadence catches cost creep and pricing problems while you can still act on them, and it builds a trend you can read. Annual calculation is too infrequent to be useful as a management tool. Software that tracks revenue and direct costs automatically makes monthly calculation effortless.
Conclusion
A gross profit calculator is one of the simplest yet most revealing tools in your financial kit. With a single formula - revenue minus cost of goods sold - you can see exactly how much each sale contributes before overheads, judge whether your pricing works, and catch cost problems before they reach your bottom line. The margin version lets you compare across products, periods, and industries with confidence.
Treat gross profit as a living metric, not a once-a-year figure. Calculate it monthly, break it down by product or service, and watch the trend. Keep your revenue net of refunds and your COGS limited to true direct costs, and the number becomes a dependable guide for pricing, cash flow, and growth. Master your gross profit and you have mastered the foundation every other profitability decision is built on.
Related guides
- Profit Margin Calculator: Formula, Examples and How to Use It
- Markup Calculator: Formula and Worked Examples
- Gross Profit vs Net Profit: Understanding the Difference
- Gross Margin Explained: Formula, Examples and How to Improve It
- Break-Even Calculator: Formula and Examples
- Pricing Strategies That Improve Profitability


