Profit Margin & Markup Calculator
Work out gross margin, markup and profit from cost and price, find the selling price for a target margin, and model true e-commerce net margin per order after shipping, packaging, payment and marketplace fees and ad spend - including your break-even ROAS and maximum cost per acquisition.
Margin Workspace
Three modes: analyse an existing price, set a price from a target margin, or model the full per-order economics of an online store.
- Revenue (price)
- $39.00
- Cost of goods
- $18.50
- Gross profit
- $20.50
- Margin
- 52.56%
- Markup
- 110.81%
- Cost as % of price
- 47.44%
Why Sellers Use the Agenvix Profit Margin Calculator
Margin decisions deserve more than a guess.
Margin and Markup, Never Confused
A 50% markup is only a 33% margin. The calculator shows both side by side and converts between them so pricing conversations use the same number.
Real E-commerce Economics
Shopify, Amazon and Etsy sellers lose margin to payment fees, platform commissions, shipping, packaging and ads. Model each line to see the net profit per order.
Advertising Guardrails
Break-even ROAS (1 ÷ contribution margin) and maximum CPA tell you the most you can pay for a customer before an order loses money.
Price Backwards from a Goal
Enter cost and the margin you need; the tool returns the price, the equivalent markup and the profit per unit.
Simple as 1-2-3
How the Calculator Works
From cost to net profit in three steps.
Pick a Mode
Margin from cost & price, price from target margin, or the e-commerce order model.
Enter Your Numbers
Costs, price, fee percentages and ad spend per order - defaults are editable examples.
Read Margin, Markup & ROAS
Results update live with the formulas used, ready to copy into a pricing sheet.
Margin Formulas Explained
Each metric, its formula and what it is for.
| Feature / Specification | Best Use Case | Engine / Output Standard | Privacy & Security | Performance Rating | Action |
|---|---|---|---|---|---|
| Gross margin % | Pricing, P&L | (Price − Cost) ÷ Price | Share of revenue kept | Core | |
| Markup % | Cost-plus pricing | (Price − Cost) ÷ Cost | Always ≥ margin | Core | |
| Price for target margin | Setting prices | Cost ÷ (1 − Margin) | Not Cost × (1 + Margin) | Core | |
| Contribution per order | E-commerce | Price − COGS − variable costs | Before ad spend | E-commerce | |
| Break-even ROAS | Ads budgeting | Price ÷ Contribution | = 1 ÷ contribution margin | E-commerce |
Margin, Markup and E-commerce Profit
1. Margin is on price, markup is on cost
Both describe the same profit, but divided by different bases. A product that costs $18.50 and sells for $39.00 makes $20.50: that is a 52.6% margin (20.50 ÷ 39.00) and a 110.8% markup (20.50 ÷ 18.50). Markup is always the larger number, and the gap widens as prices rise: 100% markup equals 50% margin, 300% markup equals 75% margin. Finance teams and marketplaces report margin; suppliers and cost-plus contracts talk markup - this tool shows both.
2. Pricing for a target margin - the division rule
To earn a 40% margin on a $30 cost, divide: 30 ÷ (1 − 0.40) = $50. Multiplying instead (30 × 1.40 = $42) gives only a 28.6% margin - the single most common pricing error in spreadsheets. The "Price from margin" mode applies the division rule and also shows the equivalent markup so you can brief suppliers correctly.
Remember that promotional discounts come off the price, not the margin: a 20% discount on a 40% margin product leaves a 25% margin, because the discount is 20% of price but 33% of profit.
3. What really comes out of an online order
Gross margin ignores everything between the sale and the bank. A typical direct-to-consumer order loses 2-3% plus a fixed fee to the payment processor, 5-15% to a marketplace if you sell through one, the outbound shipping and packaging you absorb, a share of returns, and whatever it cost in ads to acquire the buyer. The e-commerce mode lists each line so the number you optimise is net profit per order - the one that pays salaries.
4. Break-even ROAS and maximum CPA
Contribution per order (price minus all variable costs, before ads) is the most you can spend to acquire one order without losing money - your maximum CPA. Dividing price by contribution gives break-even ROAS: with a 40% contribution margin you need at least 2.5× return on ad spend just to break even. Set campaign targets above that line, and use the ROAS calculator for the full funnel.
Everything you need to know about profit margins
Formulas, benchmarks and e-commerce specifics.
How do I calculate profit margin?
Subtract cost from price to get profit, then divide profit by price and multiply by 100. A $39 product costing $18.50 has a (39 − 18.50) ÷ 39 = 52.6% gross margin.
What is the difference between margin and markup?
Margin divides profit by the selling price; markup divides profit by the cost. The same $20.50 profit on an $18.50 cost is a 52.6% margin but a 110.8% markup. Markup is always the higher figure.
How do I find the selling price for a target margin?
Divide the cost by (1 − target margin). For a 40% margin on a $30 cost: 30 ÷ 0.6 = $50. Multiplying cost by 1.4 would give a lower margin of 28.6%.
What is a good profit margin for e-commerce?
It varies widely by category and business model - commodity electronics often run gross margins in the teens while beauty, apparel and digital goods can exceed 50%. Compare against your own fixed costs and ad spend rather than a universal number; the e-commerce mode shows whether the net margin per order covers them.
What is break-even ROAS?
The return on ad spend at which an order makes zero profit after all variable costs: price ÷ contribution per order, or 1 ÷ contribution margin. A 40% contribution margin means a break-even ROAS of 2.5×.
Does the calculator include VAT or sales tax?
Enter prices net of tax that you remit to the government, since that tax is not revenue. Use the sales tax / VAT calculator to separate tax from a gross price first.
Related Developer Utilities
Discover companion utilities engineered for zero-log speed and browser-side execution.
Break-Even Calculator
Break-even units and revenue from fixed costs, price and variable cost, with profit targets and margin of safety.
ROAS Calculator
Return on ad spend, ACoS, break-even and target ROAS, plus a CPM to CPC to CPA funnel forecast for any budget.
Discount Calculator
Sale price and savings for percent or fixed discounts, stacked discounts, reverse original price and unit-price deal comparison.
Sales Tax & VAT Calculator
Add or extract sales tax, VAT and GST with regional rate presets, stacked second rates and quantities.
Dimensional Weight Calculator
DIM and billable weight for UPS, FedEx, DHL, USPS and metric couriers in inches/lb or cm/kg, with cost estimates.
Percentage Calculator
Percent of a number, what percent X is of Y, percentage change, increase/decrease and percentage difference.
More in Finance & E-commerce
Specialized utilities within the same technical domain
