Beginner

Margin Calculator — Gross Profit Margin & Markup

Enter a selling price and cost to instantly calculate gross profit margin, markup percentage, and gross profit — the three core measures of product or service profitability.
Cost of goods sold or production cost
Gross margin
40%

Profit as a percentage of revenue

Revenue (selling price)
100
Cost (COGS)
60
Gross profit
40
Markup (profit ÷ cost)
66.67 %
60%
40%
Cost
Profit
Revenue split: cost vs gross profit
Step by step
  1. 1

    Gross profit

    100 − 60 = 40
  2. 2

    Gross margin

    40 ÷ 100 × 100 = 40
Lock the current result, then change any input to compare scenarios.
Results are estimates for general information only and are not professional advice — always verify important results independently before relying on them. This is not financial, investment or tax advice; consult a qualified professional. Read the full disclaimer.
Quick answer

How does this calculator work?

Gross margin = (Revenue − Cost) ÷ Revenue × 100%. Markup = (Revenue − Cost) ÷ Cost × 100%. A 40% margin equals a 66.7% markup. To back-calculate price from a target margin: Revenue = Cost ÷ (1 − Margin/100). Enter revenue and cost to get both figures instantly.

Formula
Margin % = (Revenue − Cost) ÷ Revenue × 100 • Markup % = (Revenue − Cost) ÷ Cost × 100
How this is calculated

Gross profit margin expresses profit as a fraction of revenue. If you sell a product for 100 and it costs 60 to produce or purchase, the profit is 40 and the margin is 40 ÷ 100 = 40%. A 40% margin means 40 cents of every revenue dollar becomes gross profit, available to cover overheads and generate net income.

Markup expresses the same profit as a fraction of cost rather than revenue. For the same example, markup = 40 ÷ 60 ≈ 66.7%. Margin and markup move together but markup is always larger than the corresponding margin for any positive profit — they are frequently confused, so confirm which convention your industry or pricing tool uses.

This calculator uses revenue (selling price) and cost of goods sold (COGS). It does not deduct operating expenses, interest or tax — those appear in operating margin and net margin, which require a full income statement. To derive the selling price from a target margin, rearrange to Revenue = Cost ÷ (1 − Margin/100).

Frequently asked questions

Margin is profit divided by revenue: Margin = Profit ÷ Revenue × 100%. Markup is profit divided by cost: Markup = Profit ÷ Cost × 100%. A 40% margin equals a 66.7% markup — markup is always higher than the corresponding margin when profit is positive.

Rearrange the margin formula: Revenue = Cost ÷ (1 − Margin/100). For a 40% target margin on a product costing 60, the selling price is 60 ÷ 0.60 = 100.

Acceptable gross margin varies widely by industry. Software products typically achieve 70–90%, retail groceries 20–30%, and manufacturing 30–50%. Compare against your industry benchmark rather than a universal target.

APA

TG we-Calculate Editorial Team. (2026). Margin Calculator — Gross Profit Margin & Markup [Online calculator]. TG we-Calculate. https://we-calculate.com/calculator/margin-calculator

Chicago

TG we-Calculate Editorial Team. "Margin Calculator — Gross Profit Margin & Markup." TG we-Calculate. 2026. https://we-calculate.com/calculator/margin-calculator.

IEEE

TG we-Calculate Editorial Team, "Margin Calculator — Gross Profit Margin & Markup," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/calculator/margin-calculator

BibTeX

@misc{wecalculate_margin_calculator, title = {Margin Calculator — Gross Profit Margin & Markup}, author = {{TG we-Calculate Editorial Team}}, howpublished = {\url{https://we-calculate.com/calculator/margin-calculator}}, year = {2026}, note = {TG we-Calculate} }

Did this calculator help you?