Gross Profit Formula Calculator: How to Use It
- Gross margin
- %
- Result
- Revenue
- 50000 $
- You entered
- Cost of goods sold
- 30000 $
- You entered
This calculator works out your gross profit and gross margin from the two numbers you already have: revenue and cost of goods sold (COGS). Enter those two amounts and you get back your gross profit in dollars and your gross margin as a percentage. The formula is simple, but applying it correctly to your business requires care about what counts as COGS and what doesn’t.
Formula
Gross profit = Revenue − Cost of Goods Sold (COGS)
Gross margin = (Revenue − COGS) ÷ Revenue × 100
Where:
- Revenue is the total money from selling goods or services before any deductions (also called sales or turnover). Unit: dollars (or your currency).
- COGS is the direct cost of producing or purchasing what you sell. Unit: dollars.
- Gross profit is the money left after direct costs. Unit: dollars.
- Gross margin is gross profit as a percentage of revenue. Unit: percent.
Worked Example
Using the default values: revenue = $50,000, COGS = $30,000.
- Gross profit = $50,000 − $30,000 = $20,000
- Gross margin = ($20,000 ÷ $50,000) × 100 = 40%
The calculator shows exactly that: $20,000.00 and 40.0%.
What Counts as COGS?
COGS includes only the costs that vary directly with making or buying the product. For a manufacturer, that means raw materials, direct labor on the production line, and factory overhead directly tied to production. For a retailer or wholesaler, it is the purchase price of the goods you resell, plus freight-in and any costs to get the goods ready for sale (like packaging).
COGS does not include:
- Sales commissions
- Marketing and advertising
- Rent and utilities for the office or store
- Salaries of administrative staff
- Shipping costs to deliver to customers (that’s often a selling expense)
- Interest and taxes
Those go into operating expenses, which come after gross profit on the income statement. A common mistake is to lump all expenses together and call it COGS. That understates gross profit and makes the business look less profitable at the gross level than it really is.
How to Read the Result
Gross profit tells you the absolute dollar amount you have to cover operating expenses and still keep some net profit. Gross margin tells you the percentage of each sales dollar that survives after direct costs. A 40% margin means for every $1 of revenue, $0.40 is available for overhead and profit.
Comparing gross margin over time or against industry averages is more useful than comparing gross profit in dollars, because margin is relative to sales volume. A company can double its gross profit by doubling sales while keeping the same margin, but that doesn’t mean efficiency improved.
There is no universal “good” gross margin. It varies widely: software companies often have margins above 80%, grocery stores often run below 25%, and consultancies can be anywhere in between. The number only matters in context.
Common Mistakes
- Mixing up revenue and profit. Revenue is the top line; profit is what’s left. Entering net income instead of revenue will give a misleading result.
- Forgetting inventory changes. For a manufacturer or retailer, COGS is not simply “what you spent on materials this year.” It’s: beginning inventory + purchases − ending inventory. If you ignore inventory, you can badly misstate COGS.
- Including non-direct costs. Adding rent or admin salaries inflates COGS and shrinks gross profit.
- Using different time periods. Revenue and COGS must cover the same period (month, quarter, year). Mixing a month of revenue with a year of COGS gives nonsense.
- Rounding too early. In the example, $20,000 / $50,000 = 0.4 exactly, but with other numbers, rounding the profit before dividing can throw the margin off by a few tenths of a percent.
Limits of the Formula
Gross profit is a partial picture. It ignores operating expenses, interest, taxes, depreciation, and amortization. A company can have a healthy gross margin but still lose money if overhead is huge. Conversely, a low gross margin can be fine if volume is high and operating costs are lean.
The formula also assumes you can cleanly separate direct costs from indirect costs. In practice, some costs are ambiguous. For example, a production supervisor’s salary might be partly direct (overseeing production) and partly indirect (managing staff). Accounting standards give guidance, but judgment is still required.
For service businesses, “COGS” is often called “cost of services” or “cost of revenue.” It includes labor directly billable to clients, plus any materials used. It still excludes marketing, sales, and general administration.
Finally, gross profit is a historical measure. It doesn’t predict future profitability, and it doesn’t tell you anything about cash flow. A business can be profitable on paper but still run out of cash if customers pay slowly.
Alternatives and Related Metrics
Gross profit is just one layer of profitability. Related metrics you may also want to calculate:
- Operating profit (EBIT): Gross profit − operating expenses. Shows profit from core operations.
- Net profit: Operating profit − interest − taxes. The final bottom line.
- Contribution margin: Revenue − variable costs (which may include some costs not in COGS, like sales commissions). Useful for break-even analysis.
- Markup: (Price − Cost) ÷ Cost × 100. Different from margin; a 40% margin equals a 66.7% markup on cost.
If you’re pricing products, you’ll often work backwards from a desired margin: Price = Cost ÷ (1 − Desired Margin). For example, to get a 40% margin on a product costing $30, the price should be $30 ÷ 0.6 = $50.
Frequently Asked Questions
What is the difference between gross profit and net profit?
Gross profit is revenue minus only the direct costs of goods sold. Net profit subtracts all other expenses—rent, salaries, marketing, interest, taxes—from gross profit. Gross profit shows how efficiently you produce or source your product; net profit shows how much you actually keep.
Can gross profit be negative?
Yes. If COGS exceeds revenue, gross profit is negative. That means you are losing money on every unit sold before even considering overhead. It’s a serious red flag, though it can happen temporarily during a clearance sale or when input costs spike faster than prices can adjust.
Is gross profit the same as markup?
No. Gross profit is a dollar amount (revenue minus COGS). Markup is the percentage added to cost to arrive at price. A 50% markup means price = cost × 1.5, which gives a gross margin of 33.3%. They are related but not interchangeable.
How do I calculate gross profit for a service business?
Use the same formula, but define COGS as the direct cost of delivering the service: labor of the people doing the work, materials used, and any subcontractor costs. Exclude sales and admin salaries, office rent, and marketing. If you’re unsure, check how your accountant treats a specific cost.
What if I don’t know my COGS?
You need at least an estimate. For a product business, start with the purchase price of the goods you sold, plus freight and packaging. For a manufacturer, add raw materials and direct labor. If you truly can’t separate COGS from other expenses, you can’t calculate gross profit accurately—that’s a signal to improve your bookkeeping.
Related
Formula used
in revenue | Revenue | $ | 50000 | 0 in cogs | Cost of goods sold | $ | 30000 | 0 out profit | Gross profit | $ | revenue - cogs | 2 out margin | Gross margin | % | (revenue - cogs) / revenue * 100 | 1
Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.