Profit Margin Calculator: Revenue, Cost & Gross Margin
Use this gross profit margin calculator with revenue and cost of goods sold to calculate gross profit and profit margin, or work backward from a target margin. It is useful for products, services, ecommerce orders, and business pricing checks.
Profit Margin Calculator
Real-timeProfit Margin Calculator Results
The total sales amount used as the denominator for the gross margin calculation.
Direct cost associated with making or delivering the product or service.
Revenue minus COGS, before operating expenses, taxes, interest, and other overhead.
Gross profit expressed as a percentage of revenue.
COGS expressed as a percentage of revenue.
Shows whether the inputs produce a gross profit or a gross loss.
Profit margin formula used
-
How to read this result
Profit Margin Calculator Examples
Load a practical scenario to see how revenue, direct cost, gross profit, and margin move together.
Ecommerce product with 40% margin
A $72 direct cost and $120 revenue create $48 gross profit and a 40% gross margin.
Service project margin check
A $2,500 project with $1,500 in direct delivery cost leaves $1,000 gross profit before overhead.
Find COGS for a 30% target
At $1,000 revenue, a 30% gross margin allows $700 of COGS and leaves $300 gross profit.
Sale price below direct cost
A $45 sale with $55 COGS produces a $10 gross loss and a negative 22.22% margin.
How to Use This Profit Margin Calculator
Keep revenue, direct costs, and profit on the same order, product batch, or reporting period so the percentage is meaningful.
Choose the value to solve
Select margin or profit when revenue and COGS are known. Select revenue or COGS when you are working backward from a target margin.
Enter comparable values
Enter total revenue before the direct costs you want to subtract. Use COGS for materials, inventory, or direct delivery costs, not rent or general overhead.
Calculate the result
The tool returns gross profit, gross margin, COGS ratio, and a formula you can check line by line.
Review the business boundary
Treat the result as gross margin. Add operating expenses, taxes, interest, payment fees, shipping, and returns before estimating net profit.
Gross Profit Margin Examples
Use these quick examples to sanity-check the relationship between revenue, direct cost, profit, and margin.
| Scenario | Revenue | COGS | Gross profit | Margin |
|---|---|---|---|---|
| Retail product | $100.00 | $60.00 | $40.00 | 40.00% |
| Online service | $500.00 | $325.00 | $175.00 | 35.00% |
| Wholesale order | $2,000.00 | $1,500.00 | $500.00 | 25.00% |
| Clearance sale | $45.00 | $55.00 | -$10.00 | -22.22% |
These examples measure gross margin only. A business can have a positive gross margin and still report a net loss after operating expenses.
Profit Margin Formula
Profit margin uses revenue as the base. That is different from markup, which uses cost as the base.
Gross profit
Gross profit = Revenue - COGS
Subtract direct product or delivery costs from revenue.
Gross margin
Margin % = Gross profit / Revenue x 100
This is the main formula used by the calculator.
Revenue from a target margin
Revenue = Gross profit / (Target margin / 100)
Use a positive known gross profit and target margin.
COGS from a target margin
COGS = Revenue x (1 - Target margin / 100)
This estimates the maximum direct cost for a target gross margin.
Profit Margin vs Markup
Both percentages describe profit, but they answer different pricing and reporting questions.
| Question | Profit margin | Markup |
|---|---|---|
| What is the base? | Revenue or selling price | Cost |
| Core formula | Profit / Revenue | Profit / Cost |
| Best use | Measure gross profitability | Set a price from a known cost |
| Example | $40 profit / $100 revenue = 40% | $40 profit / $60 cost = 66.67% |
If you need to price an item from its cost and a target markup, use the separate Markup Calculator.
When to Use a Profit Margin Calculator
A gross margin check is useful whenever you need to compare direct cost against the money earned from a sale or project.
Ecommerce products
Check a product's gross margin before separately accounting for marketplace fees, fulfillment, advertising, returns, and shipping.
Service quotes
Compare project revenue with direct labor, materials, subcontractors, or delivery costs before estimating the final business profit.
Wholesale orders
Test whether a discount or volume price still leaves enough gross profit for the order size and direct fulfillment cost.
Business planning
Use target margin and revenue to estimate an allowable direct-cost budget, then compare it with a break-even plan.
Profit Margin Calculator Edge Cases
The result is only as useful as the definitions and time periods behind the numbers.
Zero revenue
Margin cannot be calculated when revenue is zero because revenue is the denominator. Enter a real sales amount or use the profit result alone.
Negative profit
A negative margin means direct costs are higher than revenue. It can occur during clearance, returns, underquoted work, or a data mismatch.
Gross vs net margin
This tool calculates gross margin from revenue and COGS. Net margin also subtracts operating expenses, taxes, interest, and other non-direct costs.
Mixed periods
Do not compare one month of revenue with a quarter of COGS. Use matching products, orders, dates, and accounting definitions.
Profit Margin Calculator FAQ
Direct answers about gross margin, profit margin formulas, COGS, markup, and net profit.
Check Your Gross Profit Margin
Enter matching revenue and direct-cost figures above, then use the result as a starting point for your full business profitability review.