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.
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 rough benchmark, retail often lives around 20-40% gross margin, services around 30-50%, and software around 60-80%, 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. Retail often targets 20-40%, software 60-80%, services 30-50%. 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.
Workflows that use this calculator
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.
- Formula Profit Margin Formula
Master the Profit Margin Formula to assess your business's profitability. Calculate net profit margin, interpret results, and use variations for strategic.
- Formula Break Even Formula
Master the Break-Even Formula to determine the exact sales volume needed to cover all costs and achieve profitability. Essential for business planning.
- Formula ROI Formula
Measure business profitability with the essential ROI formula. Learn to calculate Return on Investment, gauge financial success, and make smarter decisions.
- Examples Profit Margin Examples
Explore practical profit margin examples across diverse industries. Learn to calculate and interpret gross, operating, and net profit margins to sharpen.
- Examples ROI Examples
Explore practical ROI examples across diverse industries, from tech startups to manufacturing, to understand how to measure profitability and make smarter.
Articles
- 8 min read Rescuing a 39% Margin AI Product Without Raising Price
Rescuing a 39% margin AI product without raising price: token routing, output caps, infra trims push it past 60% without dropping a feature.
- 10 min read Ad Spend ROAS at 2.4x: Target Margin Math
Spend at 2.4x ROAS on 31% COGS and 20% target margin clears break-even but cannot scale safely. The math behind why 2.9x is the scale threshold.
- 11 min read AI COGS Accounting: A Clean 2026 Method
COGS accounting for 2026 splits AI-driven cost into model spend, infra, support overhead, and prompt-engineering amortization — with audit trail.
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.