Skip to main content

Profit Margin Calculator

Determine gross profit, profit margin percentage, and markup percentage from cost and revenue figures in one step. Three calculation modes let you solve for any unknown given two of the three core values, with step-by-step formula derivations available for verification.

Runs entirely in your browser

This tool sends nothing over the network. Everything you enter is processed on your device and never reaches our servers.

Finance
Accounting
Loading the tool
Reference

Documentation

A profit margin calculator converts cost and revenue figures into three profitability metrics. Gross profit is the difference between revenue and cost. Profit margin expresses that difference as a percentage of revenue. Markup expresses it as a percentage of cost. All three describe the same relationship from different angles, so any two of cost, revenue and margin fix the third. The calculator therefore works in three modes: cost and revenue solve for margin and markup; cost and a target margin solve for the revenue that margin requires; revenue and a target margin solve for the maximum cost that still meets the margin.

  • Cost (COGS) is the total cost of goods sold: the expense incurred to produce or acquire the item, before overhead such as rent or marketing. It is the base for markup. The value may be a decimal, a fraction such as 3/4, a mixed number such as 5 1/2, or carry dollar signs and commas, which are stripped before calculation.
  • Revenue (Selling Price) is the total amount received from the sale. It is the base for margin, and because revenue exceeds cost on any profitable sale, margin is always the smaller of the two percentages. The same input formats apply.
  • Target Profit Margin (%) drives the two reverse modes and must lie between 0 and 100. A margin of exactly 100% would require zero cost, so that value is flagged rather than solved. The gap between the target and 100 is the share of every revenue dollar that goes to cost.

The core formulas are: Gross Profit = Revenue - Cost. Profit Margin (%) = (Gross Profit / Revenue) x 100. Markup (%) = (Gross Profit / Cost) x 100. In reverse mode, Revenue = Cost / (1 - Margin / 100), and Cost = Revenue x (1 - Margin / 100). A negative gross profit means the item sold below cost, and both percentages turn negative with it. Margin and markup are routinely confused because they divide the same profit by different bases: a 50% markup is only a 33.33% margin, and a 50% margin needs a 100% markup. Quoting one where a contract or spreadsheet expects the other misstates profitability by a wide gap. Settings hold the number of decimal places, the currency symbol (the default is the dollar sign), and a step-by-step view that prints the algebraic derivation behind each result.

An item costs $60 and sells for $80. Gross profit is 80 - 60 = $20. Profit margin is 20 / 80 x 100 = 25%. Markup is 20 / 60 x 100 = 33.33%. Run in reverse, a $60 cost with a 25% target margin requires revenue of 60 / (1 - 0.25) = 60 / 0.75 = $80, and an $80 selling price with a 25% target margin allows a maximum cost of 80 x 0.75 = $60, so the three modes agree on the same sale.

Profit margin analysis applies across industries wherever pricing, costing, or profitability tracking occurs. Below are practical scenarios where margin calculations add value.

  • Retail Pricing: A store owner buys inventory at $12 per unit and sells at $20. Those figures give a 40% profit margin and a 66.67% markup, which lets the owner compare profitability across product lines and adjust pricing to meet target margins.
  • Restaurant Operations: A chef sources ingredients at $8.50 per plate and prices the dish at $24. Running the numbers shows the gross profit per plate and the margin percentage, which informs menu engineering decisions and identifies dishes that underperform.
  • Freelance Bidding: A contractor estimates project costs at $3,200 and wants a 30% margin. In cost-plus-margin mode the bid price comes to approximately $4,571, removing guesswork from proposal preparation.
  • E-commerce Analysis: An online seller tracks cost fluctuations from suppliers. Pairing the current landed cost with the fixed listing price highlights how margin erodes as costs rise, triggering repricing decisions before profitability turns negative.
  • Wholesale Negotiation: A distributor quotes $6.40 per unit to a retailer who sells at $15.99. The retailer sees the margin and markup on those figures side by side, which strengthens the case for requesting volume discounts.
  • Manufacturing Cost Control: A factory manager works from production cost per unit and the contracted sale price. Tracking margin over successive batches reveals whether process improvements are translating into higher profitability or being offset by rising material costs.
  • Startup Financial Modeling: A founder projects revenue at $500,000 with COGS of $310,000. The calculator returns gross profit, margin, and markup figures that feed directly into pitch deck financials and investor discussions about unit economics.
  • Accounting Verification: An accountant receives a reported 25% margin and a revenue figure of $1,200. In revenue-plus-margin mode the implied cost is $900, providing a quick cross-check against ledger entries.
Inputs, outputs, and what the Profit Margin Calculator computes

What the Profit Margin Calculator asks for and what it returns, as a plain list. Defaults, units, and ranges are the ones the form loads with.

Inputs

  • Cost + Revenue > Margin / Cost + Margin % > Revenue / Revenue + Margin % > Cost · default: Cost + Revenue > Margin
  • Cost (COGS) (text input) · default: 0
  • Revenue (Selling Price) (text input) · default: 0
  • Target Profit Margin (%) (text input) · default: 0
  • Decimal Places (numeric input) · default: 2 · range: 0 to 10
  • Currency Symbol (text input) · default: $
  • Show step-by-step formulas · default: off

Controls

Calculate · Reset

Example

An item costs $60 and sells for $80.