Gross profit calculator: formula, examples and ad limits
Gross profit calculator method: net revenue minus COGS, worked examples, margin vs markup, and how each product's margin sets its break-even ROAS.
Gross profit is net revenue minus the cost of goods sold (COGS); gross margin is that profit as a share of revenue. It is the first number a calculator gives, and the wrong one for an ad target.
I worked one illustrative €50.00 order and five markups through the formulas. The order’s 40% gross margin shrinks to 25% before ads, so it breaks even at a ROAS of 4, not 2.5.
How do you calculate gross profit?
To calculate gross profit, subtract COGS from net revenue; divide the result by net revenue for gross margin. Our gross margin glossary entry defines both with a worked example, and a calculator needs only those two inputs:
| Output | Formula |
|---|---|
| Gross profit | Net revenue − COGS |
| Gross margin | Gross profit ÷ net revenue × 100 |
| Markup | Gross profit ÷ COGS × 100 |
Net revenue is the price the customer actually paid, after discounts and excluding VAT. Feed in the list price and the arithmetic describes a sale that never happened. The margin calculator works out all three from your price and cost.
Worked examples for a store and single products
The formulas work for a year of sales or one order (illustrative figures):
| Scenario | Net revenue | COGS | Gross profit | Gross margin | Markup |
|---|---|---|---|---|---|
| Store, full year | €1,000,000.00 | €600,000.00 | €400,000.00 | 40% | 66.7% |
| Single product sale | €100.00 | €40.00 | €60.00 | 60% | 150% |
| Same product at 20% off | €80.00 | €40.00 | €40.00 | 50% | 100% |
Taking €20.00 off the price removes €20.00 of gross profit: a 20% discount cuts this product’s gross profit by a third.
Gross margin vs markup: which one sets the ad limit?
Gross margin sets the ad limit, never markup. Markup divides the same profit by cost instead of revenue, so it is always the larger percentage.
Read markup as margin and a product looks able to afford more advertising than it can:
| Markup | Gross margin | 1 ÷ markup (wrong) | 1 ÷ margin |
|---|---|---|---|
| 25% | 20.0% | 4.00 | 5.00 |
| 50% | 33.3% | 2.00 | 3.00 |
| 100% | 50.0% | 1.00 | 2.00 |
| 150% | 60.0% | 0.67 | 1.67 |
The error is exactly 1 at every markup, because 1 ÷ margin equals 1 + 1 ÷ markup. A product marked up 50% looks safe at a ROAS of 2, when it needs 3 just to cover its cost.
To convert, margin is markup ÷ (1 + markup). The markup vs margin entry explains the difference in more detail.
Gross profit or gross margin: which one ranks products?
Gross profit in euros ranks products by what they earn; gross margin only makes differently priced products comparable. A low-volume product with a strong margin can earn less in total than a best seller with a thin one.

Show the dataHide the data
| Product | Gross profit per month |
|---|---|
| Product A: 60% margin, 10 sold | €1,200 |
| Product B: 30% margin, 200 sold | €2,400 |
Sorted by margin, product A comes first and hides that product B pays twice as much towards everything else. Keep both outputs visible.
Which costs belong in COGS?
COGS is the direct cost of the products you sold: the purchase or manufacturing cost, plus what your accounting policy adds to inventory, such as inbound freight and import duties. Marketing, administration, interest and taxes stay out: they are operating costs, not product costs.
For a manufactured product, COGS also holds direct materials and production labour, not only the supplier invoice.
Over a reporting period, work COGS out from inventory:
COGS = beginning inventory + net purchases and directly attributable costs − ending inventory
That isn’t today’s supplier price times units sold: stock bought at different prices sells at the cost your valuation method assigns. The COGS calculator runs this period formula.
This placement keeps variable order costs out of COGS, each visible as its own line. It is a management model for ad decisions; statutory accounts may differ.
| Cost | In COGS? | Where it goes in this model |
|---|---|---|
| Purchase or manufacturing cost | Yes | COGS |
| Inbound freight and import duties | Yes, when capitalised | COGS |
| Packaging | Sometimes | COGS or fulfilment, chosen once and kept |
| Outbound shipping | No | Contribution layer |
| Payment processing fees | No | Contribution layer |
| Marketplace commissions | No | Contribution layer |
| Returns handling and reverse shipping | No | Contribution layer |
| Advertising | No | Below contribution |
Write the policy next to the calculator, with each input’s source system. Then merchandising and marketing share one definition, and moving a cost between categories can’t pass for an improvement.
Why isn’t gross profit your ad budget?
Gross profit isn’t your ad budget, because shipping, payment fees and returns are paid from it before the ad is. What is left is contribution before ads, the pool an ad can spend.

Show the dataHide the data
| Profit layer | Left of the order |
|---|---|
| Net revenue | €50.00 |
| Gross profit | €20.00 |
| Contribution before ads | €12.50 |
| Contribution after ads | €4.50 |
In the example, €6.00 of outbound shipping and a €1.50 payment fee turn €20.00 of gross profit into €12.50, a 25% contribution margin. An €8.00 ad leaves €4.50, or 9% of revenue, before rent, salaries and tax.
Each layer answers a different question:
| Layer | Question it answers | Use it for |
|---|---|---|
| Gross profit | Does the price cover the product? | Pricing, supplier terms, inventory cost |
| Contribution before ads | What may acquiring this order cost? | Break-even ROAS and targets |
| Contribution after ads | What did buying this order leave? | Product decisions, before overhead and tax |
The contribution margin calculator works out the middle layer per product. Leave VAT out of revenue at every layer: it belongs to the tax authority.
Watch for double deductions. If landed cost includes inbound freight, don’t subtract the freight invoice again; if a marketplace pays out net of commission, rebuild gross revenue first.
How do returns change the margin?
Returns lower margin twice: the refund removes the revenue, and reverse shipping, inspection and repackaging add costs the order never had. NRF and Happy Returns estimate that 19.3% of online sales were returned in 2025.
The €50.00 order above assumed nobody sends it back. Suppose each return refunds €50.00 and the product goes back on sale, but the €7.50 of shipping and fees is lost and the return adds €6.00 of reverse shipping and €2.00 of handling.

Show the dataHide the data
| Return rate | Contribution before ads per order |
|---|---|
| 0% | €12.50 |
| 10% | €9.70 |
| 19.3% | €7.10 |
| 30% | €4.10 |
At 30% returns the order keeps €4.10, and break-even ROAS on reported revenue reaches 12.20. A ROAS that looks excellent in the ad account can still lose money.
That 19.3% is an average across online retail, not your rate. Replace it with returned units ÷ eligible sold units per product or category; how product returns affect profitability covers the formula and its ROAS impact.
Model refunds and recovery separately
Start from sales after discounts, then subtract recognised refunds. For a forecast, add a reserve for returns still to come, without subtracting booked refunds a second time.
Recovered stock isn’t recovered value: a returned product may resell at full price, need a markdown or be written off. An exchange keeps the revenue but adds a shipment.
Turn uncertain inputs into a margin range
Build three scenarios per product from matched assumptions instead of one store-wide return rate:
| Scenario | Assumptions | Use the contribution as |
|---|---|---|
| Low | More returns, weaker recovery, higher handling cost | Conservative floor |
| Base | Expected returns and observed recovery | Working estimate |
| High | Fewer returns and stronger recovery | Optimistic ceiling |
Set ad limits from the conservative floor while the return window is open. A high-margin product with frequent, unsellable returns can leave less contribution than a lower-margin product customers keep.
How do you turn a product’s margin into an ad limit?
Break-even ROAS is 1 divided by the contribution margin before ads: at 25%, a product needs a ROAS of 4 before its ads stop losing money. Leave advertising out of that margin, or the calculation goes circular.
The break-even ROAS calculator gives this floor for your own numbers.
- Calculate gross profit per productNet revenue after discounts, excl. VAT, minus landed cost. In the example: €50.00 − €30.00 = €20.00, a 40% gross margin.
- Subtract variable order costs and returnsShipping, payment and marketplace fees, and a returns reserve, each once. €20.00 − €6.00 − €1.50 = €12.50, a 25% contribution margin before ads.
- Divide 1 by the contribution margin1 ÷ 0.25 = a break-even ROAS of 4. Below it, every sale loses money before overhead.
- Set the target above break-evenKeep a share of revenue for overhead and profit: 1 ÷ (0.25 − 0.10) = a ROAS of 6.67, a target ROAS of 667%.
In profit terms the same floor is a POAS of 1.0, since POAS = ROAS × contribution margin (POAS vs ROAS). The table adds a target that keeps 10% of revenue after ads, calculated as 1 ÷ (contribution margin − 0.10):
| Contribution margin before ads | Break-even ROAS | ROAS to keep 10% of revenue | As target ROAS |
|---|---|---|---|
| 25% | 4.00 | 6.67 | 667% |
| 30% | 3.33 | 5.00 | 500% |
| 44% | 2.27 | 2.94 | 294% |
| 50% | 2.00 | 2.50 | 250% |
If the share you want to keep equals the contribution margin or exceeds it, there is no ad allowance left. Setting a target ROAS from your margin walks through choosing that share.
Turn the ROAS threshold into a cost per click
A ROAS threshold isn’t a maximum cost per click. The allowable acquisition cost per order is contribution before ads minus the contribution you want to keep: €12.50 − €5.00 = €7.50 in the example.
Multiply that allowance by the click-to-order conversion rate to get the click ceiling.

Show the dataHide the data
| Click-to-order conversion rate | Maximum cost per click |
|---|---|
| 1% | €0.08 |
| 2% | €0.15 |
| 3% | €0.23 |
| 4% | €0.30 |
| 5% | €0.38 |
At a 2% conversion rate, the €50.00 order can afford €0.15 a click. If the €7.50 already allows for refunds, don’t deduct returns again through the conversion rate.
Use the threshold per product, not per account
A break-even ROAS for each product is a decision line, not something an automated bid strategy enforces per product. Use it in this order:
- Calculate contribution per product, with the conservative return scenario where uncertainty is material.
- Group products into margin bands, so each campaign or portfolio target covers similar economics.
- Compare actual ROAS with each band’s target, with revenue definitions, attribution windows and cost periods aligned.
- Lower the priority of products below their required ROAS. Give more priority to products above it when stock and demand allow.
Don’t run step 4 backwards: a product below its line doesn’t earn more budget because its reported revenue is growing.
By hand, this is one spreadsheet row per product, refreshed whenever a price, cost or return rate moves. Product Metrics does it for every product: connect your margins and each product is segmented on POAS instead of ROAS.
The segments go to Google Merchant Center as labels, so campaigns give more priority to the products that clear their line. Product Segmentation shows how.
What should you check before you change a target?
Before a threshold changes a campaign, check that price, cost and conversion data describe the same orders. Start with the products with the most ad spend:
| Check | Confirm |
|---|---|
| Revenue basis | Price paid, excl. VAT and after discounts, defined as in your ad reports |
| Landed cost | The cost assigned to the units sold, including capitalised freight and duties |
| Order deductions | Shipping, payment, marketplace and fulfilment costs, each counted once |
| Returns reserve | The rate, how recovered stock is valued, and the order cohort behind it |
| Status | Ready to scale, needs investigation, or not for paid acquisition today |
Check the measurement before judging the product
A weak-looking product may be missing conversions; a strong-looking one may report revenue incl. VAT. Check both the revenue and the spend inputs before you move budget.
Look at product journeys as well as direct sales. A shopper can click one product and buy another, so the clicked product’s own revenue undercounts what it brings in.
Don’t scale on orders whose return window is still open: use the reserve until the cohort has produced its normal refunds.
Make the review repeatable
Recheck the model monthly, and when supplier prices, promotions, carrier rates or the returns policy change. Save the input date, so anyone can see why a target moved.
Match the fix to the cause. A shipping-heavy product may need a bundle or a free-shipping threshold; a frequently returned one, better size information. Lowering its priority protects the budget but fixes neither.
Final thoughts
A gross profit calculator tells you whether the price covers the product. It can’t tell you what an ad may cost, because shipping, fees and returns take their share first.
In the €50.00 example, 40% gross became 25% to spend, and break-even ROAS moved from 2.5 to 4. This week, compare the ROAS of your ten highest-spending products with 1 ÷ each one’s contribution margin: the ones below their line are where budget leaks first.
For a second take on the formulas, Xero’s gross profit guide defines gross profit and gross margin for small businesses, and Investopedia’s gross profit explanation separates direct production costs from marketing, administration, interest and taxes.
If you make your own products, Amazon’s seller guide to calculating profit margins counts manufacturing, raw materials and direct labour as COGS, and the Inkle guide to COGS works through the period calculation from inventory.
The 19.3% return rate is cited in LevelCFO’s ecommerce benchmarks. If returns are where your margin leaks, explore eCommerce returns management workflows to see how inspection and restocking outcomes can reach the margin model.
If a product’s ROAS looks off before its margin does, Trackingplan’s explanation of how to calculate ROAS accurately covers checking revenue and spend inputs. If its gross margin points at its price rather than its ads, the guide to improve business profitability with Nexist connects margin analysis with pricing.
Written by
Berend Vrakking, Founder of Product Metrics
1M+ products analysed · Nominated at the Dutch Search Awards for Best Measurement Campaign (2023) and Best Use of Data (2024)
Keep reading.
Ecommerce profit margins: what is good and how to calculate
Ecommerce profit margins: US online retailers average 39.6% gross, listed retailers about 5% net. What is good, how to calculate it, and break-even ROAS.
Operationalizing POAS: Best Practices, Governance, and Analysis
Operationalizing POAS for Google Ads: one profit definition, profit sent to Google Ads and Meta server-side, products segmented on it and a weekly review.
POAS In The Real World Passing Profit, Composing Conversion Value, And Bidding With Confidence
POAS in the real world passing profit to Google Ads: what to send as conversion value, which costs to include, how to keep margins private and test it.
Frequently asked questions.
Is gross profit the same as net profit?
Should shipping charged to the customer count as revenue?
What is a good gross margin for an online store?
See which of your products to push, fix or pause. Start with your own products, or a 30-second estimate.
Check one product first: work out its break-even ROAS in the calculator. Then see where all your products stand.
Questions, or want to spar about your products? Book a demo: a video call with Berend, then a demo account.