Pricing
Profit Margin Calculator
Calculate gross margin and markup, or set prices from desired margin percentages.
Result
Revenue build-up
Cost plus profit explains the full selling price.
How do you calculate profit margin?
Profit margin is profit as a percentage of revenue: subtract cost from revenue, divide by revenue and multiply by 100. Selling for $100 with a $60 cost leaves $40 of profit, a 40% margin and a 66.67% markup.
Margin % = (revenue − cost) ÷ revenue × 100 · Markup % = (revenue − cost) ÷ cost × 100 · Price = cost ÷ (1 − target margin)
Use cost of goods sold for gross margin; add operating expenses to get net margin. To price for a target margin, divide cost by one minus the margin: a $35 cost at a 70% target margin needs a $116.67 price.
Real-life profit margin examples, computed by this calculator
| Example | Profit | Margin | Markup |
|---|---|---|---|
| A $4.50 coffee with $1.35 of beans, milk and cup | $3.15 | 70% | 233.33% |
| A $49/month software seat with $9.80 of hosting and support | $39.20 | 80% | 400.00% |
| A month with $50,000 revenue, $20,000 COGS and $22,000 operating costs (net margin) | $8,000 | 16% | 19.05% |
A high gross margin does not mean a high net margin. The coffee's 70% gross margin ignores rent, wages and equipment; once operating costs are counted, as in the third row, the net margin can fall to 16%.
Margin vs markup
Margin divides profit by price; markup divides profit by cost, so markup is always the larger number for the same sale. On a $100 cost, each target margin needs these prices and markups:
| Target margin | Price on a $100 cost | Equivalent markup |
|---|---|---|
| 20% | $125.00 | 25.00% |
| 25% | $133.33 | 33.33% |
| 30% | $142.86 | 42.86% |
| 40% | $166.67 | 66.67% |
| 50% | $200.00 | 100.00% |
| 60% | $250.00 | 150.00% |
| 75% | $400.00 | 300.00% |
For discounts on top of a markup, the margin, markup and discount calculator converts between all three.
Common profit margin mistakes
- Adding a markup when you meant a margin. A 40% markup on $60 is $84, a 28.57% margin; a 40% margin needs a $100 price.
- Including sales tax or VAT in revenue. Tax collected for the government is not revenue; leave it out of both numbers.
- Leaving out variable costs. Payment processing, shipping, refunds and per-user hosting belong in cost for an honest gross margin.
- Comparing gross and net margins. State which one you mean; the gap between them is your operating cost base.
For AI products where model calls are a real per-user cost, use the AI product margin calculator; to see how many units cover fixed costs, use the break-even units calculator.
What does the Profit Margin Calculator calculate, and which formula does it use?
The Profit Margin Calculator works out gross margin as profit divided by revenue and markup as profit divided by cost: a $100 sale that costs $60 is a 40% margin and a 66.7% markup. In price mode it runs the other way, price = cost ÷ (1 − target margin), so a 40% margin on a $60 cost needs a $100 price.
Last updated .
How to use it
- Choose Calculate Margin when you know price and cost, or Set Price from Margin when you know cost and need a selling price target. Cost should include the real delivery cost of the product or service, not just the most visible direct expense.
- Read revenue or price, cost, profit, gross margin percent, and markup percent. As a reference point, Damodaran's January 2026 data for listed US companies puts gross margin at 33.2% for general retail, 35.3% for specialty retail, 33.4% for business and consumer services and 71.7% for system and application software, so interpretation depends on business model.
- Use the result to decide whether the offer is genuinely profitable or only looks acceptable on revenue. If cost is close enough to revenue that margin lands in the teens, small discounts or scope changes can wipe out profit quickly.
- When using target margin mode, test the required price against what the market will actually tolerate. If the needed price is too high, fix cost structure, packaging, or scope before forcing a margin target that customers will not pay.
- Re-run after every supplier, labor, or packaging change and review by SKU or service tier each month. Track margin by channel over time because one discount-heavy channel can drag down an otherwise healthy blended average.
Questions people usually ask
What's the difference between gross margin and markup?
Gross Margin % = (Revenue - Cost) / Revenue × 100. Markup % = (Revenue - Cost) / Cost × 100. Markup is always higher than margin. A 50% margin ≈ 100% markup.
When should I use 'Set Price from Margin'?
Use this when you know your cost and target margin (e.g., 'I want a 40% margin on this product'). It calculates the required price.
Can I use this for services?
Yes. Cost includes labor, materials, and allocated overhead. Revenue is what you charge customers.
What's a healthy margin?
It varies by industry. Damodaran's January 2026 data for listed US companies puts gross margin at 33.2% for general retail, 35.3% for specialty retail, 33.4% for business and consumer services and 71.7% for system and application software; a small business can sit well away from those averages, so compare against your own history first. Competitive and cost pressures drive your floor.
Is this tool free and private to use?
Yes. AI Biz Hub tools are free, no-signup browser tools. Inputs stay in your browser unless you choose to share a URL.
Is this professional advice?
No. Outputs are business planning estimates — not legal, tax, or accounting advice.
Related calculators
- Pricing Micro-SaaS Pricing Engine
Find your price floor, suggested price, and ceiling from per-user costs, competitor benchmarks, and target margin.
- Pricing AI Product Margin Calculator
Calculate per-user margin for AI products from subscription price, API token costs, hosting, and per-user expenses.
- Pricing Profit Margin / Markup / Discount Calculator
Convert margin, markup, and discount with live formulas you can trust.
- Pricing Price Elasticity Calculator
Calculate price elasticity of demand and see whether a price change grows or shrinks revenue.
Background on the Profit Margin Calculator
- Alternatives Stripe Alternatives for SaaS (2026)
Stripe alternatives for SaaS in 2026: Paddle, Lemon Squeezy, Polar, and Braintree compared on fees, merchant-of-record tax handling, and fit.
- Statistics 15 E-Commerce Statistics
E-commerce statistics on online sales share, growth and cart abandonment, each from a named primary source: the U.S. Census Bureau or Baymard Institute.
Articles
- 11 min read AI COGS Accounting: A Clean 2026 Method
AI COGS accounting for 2026: tokens, infrastructure and escalated support go in cost of revenue; prompt and eval work is development, never COGS.
- 7 min read How to Run a Profitability Analysis
Run a profitability analysis by product, channel, and segment to find where contribution margin comes from, where it leaks, and how to fix it.
- 10 min read Solo Founder Tax Planning
Solo founder tax for 2026: self-employment tax bites every dollar, and the S-corp election pays only above about $66k of profit. The break-even math.
More in AI product economics
Understand the costs, margins, and pricing of building AI-powered products.
- Startup Cost Estimator
- Profit Margin / Markup / Discount Calculator
- SaaS Pricing Strategy Calculator
- Unit Economics Calculator
Use it from code
The same calculation as a JavaScript module you can import. It runs where you import it, with no request, key or rate limit.
import { compute } from "https://aibizhub.io/engines/profit-margin-calculator.js"; Input and output contract, TypeScript types and the guide for agents.