How much of each sale is left after direct costs, measured two ways
Gross margin tells you what fraction of a sale remains after its entered direct cost. Markup measures the same gross profit against cost instead, so its percentage is different even when the underlying sale is identical.
A sale can look profitable under one percentage and less impressive under another without the cash figures changing. If a product sells for 150 and its direct cost is 100, the 50 difference is 33.3333% of the selling price but 50% of cost. A manager setting retail prices should know which denominator the target uses before applying it.
A sale receipt shows gross profit alongside margin and markup, keeping their different denominators visible. A loss stays signed, and zero cost makes markup explicitly undefined.
How sales revenue and direct cost produce margin and markup
Two inputs produce two percentages that share a numerator but not a denominator. That is why a change in cost moves markup faster than margin.
- Sales revenue
- The selling price or the period's sales, and the denominator of margin. Raising revenue from 125 to 160 on a cost of 100 lifts margin from 20% to 37.5% and markup from 25% to 60%. Enter revenue after discounts and returns, and leave out any sales tax collected on the sale.
- Direct cost of sales
- Costs tied to each sale, such as materials, goods bought for resale or packaging. On revenue of 150, a cost of 100 gives 33.3333% margin and 50% markup, while a cost of 120 gives 20% and 25%. Leaving out per-sale shipping or platform fees overstates both figures.
- Gross profit
- Revenue minus cost, 50 in the example. It is the numerator of both percentages, so a gross loss turns margin and markup negative together: revenue of 150 against a cost of 160 gives −6.6667% margin and −6.25% markup.
- Margin ceiling
- Margin cannot exceed 100% because cost cannot be negative, while markup has no upper limit. Revenue of 300 on a cost of 100 is a 200% markup but a 66.6667% margin, which is why one percentage must never be substituted for the other on a price list.
Steps
- Enter revenue from the sale or comparable sales period.
- Enter the direct cost associated with exactly those sales, using the same currency and period.
- Calculate and compare gross profit, margin on revenue and markup on cost; a loss keeps its minus sign.
Reading tip: Read the revenue-to-cost receipt first. Then compare the two percentage labels; if cost is zero, markup is mathematically undefined even though gross margin is 100%.
Pricing questions that depend on margin versus markup
Price a product
Compare a proposed sale price with the direct cost and inspect the margin on selling revenue.
Avoid markup confusion
Explain why a target markup on cost is different from the resulting percentage margin.
Review a sales period
Use matched period revenue and direct costs to inspect gross performance before overhead.
Spot a loss
Keep a negative gross result visible when direct cost exceeds the sales amount entered.
How the calculation works
- revenue
- Positive proceeds from the sale or sales period being analyzed.
- direct cost
- Entered cost tied to those same sales, excluding costs that were not supplied.
- gross profit
- Revenue less direct cost; a negative value is a gross loss.
- denominator
- Revenue for margin and cost for markup, which is why their percentages differ.
Markup has no defined value when cost is zero. This is gross margin on entered direct cost, not net business profit.
What every part means
- revenue
- Positive proceeds from the sale or sales period being analyzed.
- direct cost
- Entered cost tied to those same sales, excluding costs that were not supplied.
- gross profit
- Revenue less direct cost; a negative value is a gross loss.
- denominator
- Revenue for margin and cost for markup, which is why their percentages differ.
Calculate it step by step
The two entered amounts must describe the same sale or accounting period.
The selling amount is the denominator, so revenue must be positive.
This is undefined when entered direct cost is zero; it is never substituted with margin.
Decimal arithmetic keeps the division unrounded until display. Negative gross profit produces a negative margin. The visual displays costs against sales, including an overrun when cost is greater than revenue.
See how Calculation Guide tests examples and handles calculation limits.
See it in practice
- Sales revenue
- 150 currency units
- Direct cost of sales
- 100 currency units
A sale of 150 with direct cost 100 leaves gross profit 50. Margin = 50 / 150 × 100 = 33.3333%; markup = 50 / 100 × 100 = 50%.
- Gross profit or loss50
- Markup on cost50%
Interpretation & limitations
How to read your result
Gross margin is a share of selling revenue available after the entered direct cost. It is not the share the business keeps after overhead. A 20% target margin calls for a different selling price from a 20% markup.
Where this estimate stops
The model does not classify accounting expenses for you. Excluded shipping, platform fees, refunds, taxes or labor may change the true gross result; indirect overhead is outside gross margin by design.
Frequently asked questions
01Are margin and markup the same percentage?
No. Margin divides gross profit by revenue, while markup divides it by cost. A sale of 150 that costs 100 has 33.3333% margin and 50% markup.
02Can a gross margin be negative?
Yes. If entered direct cost exceeds revenue, gross profit and margin are negative. Review whether the revenue and cost cover the same items and period.
03Why is 50% markup only 33.3333% margin in the example?
The profit is 50 either way, but dividing by cost 100 gives 50%, while dividing by selling price 150 gives one third.
04Can I enter total monthly sales and cost?
Yes, if cost and revenue belong to the same month and the cost is directly associated with those sales. Mixed periods distort the comparison.
05Does a 100% gross margin mean all sales are net profit?
No. It means the entered direct cost is zero; other operating expenses may still exist and must be accounted for elsewhere.
06How should I treat a negative result?
It shows entered direct cost greater than sales revenue. Check the source figures, then investigate whether the sale really lost money at the gross level.
07What price do I need for a target margin?
Divide cost by one minus the target margin as a decimal: price = cost ÷ (1 − margin). For a 20% margin on a cost of 100, price is 100 ÷ 0.8 = 125; entering 125 and 100 here confirms 20% margin and shows the 25% markup it implies. Adding 20% to cost instead gives 120, which is only a 16.67% margin.
Sources & references
Articles that use this calculator
- Profit Margin vs Markup: Why a 25% Markup Is Only a 20% MarginA 25% markup on cost gives a 20% margin on the selling price, because the same profit is divided by a larger number. Convert with margin = markup ÷ (1 + markup) and markup = margin ÷ (1 − margin).
- Break-Even Analysis Worked Example: Costs, Contribution and PriceBreak-even units equal fixed costs divided by contribution per unit (price minus variable cost). In the case below that is 120,000 ÷ 500 = 240 mugs a month, and a price cut raises the threshold much faster than a price rise lowers it.