Given a revenue figure and a cost figure, what is the gross profit, profit margin, markup, and cost ratio — and how do margin and markup relate to each other?
This tool is for: Small-business owners pricing a product or service and sizing up unit economics · Founders building a basic income statement or pricing model · Anyone who needs to convert between margin and markup without making the classic arithmetic mistake of treating them as equal
- Gross profit in absolute dollars
- Profit margin as a percentage of revenue
- Markup as a percentage of cost (the distinct figure from margin)
- Cost ratio — the share of revenue consumed by cost
Formulas Used
Gross Profit
Gross Profit = Revenue − Cost
Where: Revenue = Top-line sales for the period or transaction (USD), Cost = Matched cost basis for the same revenue (USD)
Source: U.S. Small Business Administration — profit and margin guidance
Profit Margin
Profit Margin = (Revenue − Cost) / Revenue
Where: Revenue = Top-line sales (USD), Cost = Cost basis (USD)
Source: Standard managerial-accounting identity — OpenStax Principles of Accounting
Markup
Markup = (Revenue − Cost) / Cost
Where: Revenue = Sales price (USD), Cost = Cost basis (USD)
Source: Standard pricing identity — OpenStax Principles of Accounting
Key Insight
Margin and markup measure the same dollar profit against different denominators. A price that delivers a 50% markup over cost produces a 33.33% margin of revenue, not a 50% margin. The gap between the two grows as the ratio rises — a 100% markup is a 50% margin, a 300% markup is a 75% margin. Using them interchangeably is the single most common pricing error in small businesses.
Frequently Asked Questions
What is the difference between profit margin and markup?
They share the same numerator (revenue minus cost) but divide by different denominators. Margin divides by revenue and answers 'what share of each sales dollar is profit?' Markup divides by cost and answers 'by what percentage did the cost get marked up to reach the price?' On the same $400 gross profit from $1,000 revenue and $600 cost, the margin is 40% (400/1000) and the markup is 66.67% (400/600). When pricing, apply markup to cost; when reporting, cite margin to investors and operators.
Should I enter cost of goods sold (COGS) or total costs?
Either is valid — the arithmetic is the same, but the label changes. COGS gives you a gross margin; COGS plus operating expenses gives you an operating margin; everything including interest and taxes gives you a net margin. Pick the cost basis that matches the question you are answering. The calculator does not label the result; that interpretation is the user's responsibility.
What does the -1 output mean?
It is a sentinel that flags an undefined case rather than a real percentage. Revenue of zero or negative produces -1 across all outputs because margin cannot be computed against zero revenue. A non-zero revenue with zero cost produces a valid 100% margin but returns -1 for markup specifically, because markup divides by cost and is mathematically undefined when cost is zero. Treat any -1 output as a signal to re-check the inputs rather than as a usable number.
About This Calculator
Sources:
- U.S. Small Business Administration — Manage Your Finances — Federal small-business guidance on revenue, cost, and profit measurement used as the basis for margin and markup computation
- OpenStax — Principles of Accounting, Volume 2: Managerial Accounting — Peer-reviewed open academic textbook (Rice University) covering gross margin, markup, cost-volume-profit analysis, and the distinction between margin and markup
Limitations:
- Single revenue / single cost input — does not compute a weighted margin across a product mix
- Does not classify costs (fixed vs variable, COGS vs operating expense) — the interpretation of the margin depends on which cost basis the user enters
- Does not model taxes, discounts, returns, or payment-processing fees unless the user has already incorporated them into revenue or cost
- Profit margin and markup are reported in percent and rounded to two decimals — high-precision accounting output may differ by a few basis points
- Sentinels (-1) are returned for undefined cases (revenue ≤ 0, or markup when cost = 0) and are not valid percentages — they flag that the inputs fall outside the calculator's domain
When to consult a professional: Before using a margin figure in a financial statement, investor document, or tax filing — an accountant can confirm whether the cost basis matches the accounting convention used by the relevant audience
This calculator computes gross-margin-style figures from a revenue and cost pair. Whether the result is a gross margin, an operating margin, or a net margin depends on which cost basis the user enters — the arithmetic is the same but the interpretation differs. The calculator does not classify costs, interpret accounting conventions, or account for taxes. It is a planning and pricing reference, not an accounting output.