Markup and Margin Calculator

Calculate selling price, gross profit, markup, and gross margin from cost and price or from a target percentage. Enter percentages as whole numbers (for example, 25 for 25%).

Enter Any Two Values

Use any two fields among cost, selling price, gross profit, markup, and margin. The calculator solves the rest as you type.

Advanced costs

Add per-unit variable costs when you want adjusted markup and margin for ecommerce or marketplace pricing.

Discount and rounding
Enter any two values to calculate selling price, cost, profit, markup, and margin.

Core formulas: gross profit \(=P-C\), markup \(=\dfrac{P-C}{C}\), and gross margin \(=\dfrac{P-C}{P}\).

Advertisement

Worked Pricing Examples

Cost plus markup to selling price

Cost $80 with a 25% markup: selling price \(=80\times1.25=\$100\). Gross profit is $20 and gross margin is 20%.

Cost plus target margin to selling price

Cost $80 with a 20% target margin: selling price \(=80\div(1-0.20)=\$100\). The matching markup is 25%.

Cost and price to markup and margin

Cost $80 and price $100: gross profit is $20, markup is \(20\div80=25\%\), and margin is \(20\div100=20\%\).

Formulas & Notes

Definitions

\(\pi = P - C\) (profit per unit). Markup on cost \(m_u=\dfrac{\pi}{C}\). Gross margin on price \(m_g=\dfrac{\pi}{P}\).

Bridge Equations

\(\displaystyle m_g=\frac{m_u}{1+m_u}\quad\text{and}\quad m_u=\frac{m_g}{1-m_g}\).

Solve-For

\(\displaystyle P=C(1+m_u)\) or \(\displaystyle P=\frac{C}{1-m_g}\). Cost from price: \(\displaystyle C=\frac{P}{1+m_u}=P(1-m_g)\).

Tax

Sales tax/VAT is typically applied after price and does not change markup or gross margin; tax outputs are for display.

What Is Markup? How to Calculate It (and Avoid Common Mistakes)

Markup expresses how much you increase cost to set a selling price. If C is your unit cost and P is your selling price, then profit per unit is \(\pi = P - C\). Markup on cost is \(\displaystyle m_u = \frac{\pi}{C} = \frac{P - C}{C}\). For example, a cost of 100 and a selling price of 125 gives a markup of \(\frac{25}{100} = 0.25 = 25\%\). In contrast, gross margin (gross profit % on price) is \(\displaystyle m_g = \frac{\pi}{P}\). The two are related by the bridge equations: \(\displaystyle m_g = \frac{m_u}{1 + m_u}\) and \(\displaystyle m_u = \frac{m_g}{1 - m_g}\).

Core Pricing Formulas

Price from cost and markup: \(\displaystyle P = C(1 + m_u)\).
Price from cost and margin: \(\displaystyle P = \frac{C}{1 - m_g}\).
Cost from price and markup: \(\displaystyle C = \frac{P}{1 + m_u}\).
Cost from price and margin: \(\displaystyle C = P(1 - m_g)\).

Best Practices for Using Markup

  • Start with the right cost basis. Use landed cost where relevant: product + freight + duties + packaging + variable handling.
  • Convert markup ↔ margin correctly. A 25% markup is only a 20% margin. If you target margins in reporting, set price from margin, not markup.
  • Separate discounts from pricing logic. If you run a discount \(d\) on price, post-discount margin is \(m_g'=\dfrac{P(1-d)-C}{P(1-d)}\).
  • Mind MAP and competitive ceilings. Use the compare tab to test scenarios that respect those limits.
  • Round prices intentionally. Round after computing price, then re-check implied margin.
  • Exclude taxes from margin math. VAT/GST/sales tax is typically added at checkout and does not change markup or margin.
  • Track cost drift. Recompute markup/margin whenever cost changes.
  • Account for returns and allowances. Realized margin may be lower than ticket calculation.

Worked Example

Suppose C = 80 and you want a 30% margin. Price \(P = \dfrac{80}{1 - 0.30} = 114.2857...\). Profit \(\pi = 34.2857...\). The implied markup is \(m_u = \dfrac{0.30}{1 - 0.30} = 0.4286 = 42.86\%\). With a 10% promotional discount, new price = \(114.2857 \times 0.9 = 102.8571\), new margin \(=\dfrac{102.8571 - 80}{102.8571}\approx 22.0\%\).

When to Use Markup vs. Margin

Markup is intuitive for buyers and costing teams; margin aligns with P&L and finance. Use markup for rapid quoting from cost, and margin when communicating targets, forecasting profits, or benchmarking SKUs.

Markup and Gross Margin Guide

How to calculate markup

Markup measures gross profit against cost: \(\displaystyle markup=\frac{selling\ price-cost}{cost}\). If cost is $80 and price is $100, markup is 25%.

How to calculate gross margin

Gross margin measures gross profit against selling price: \(\displaystyle margin=\frac{selling\ price-cost}{selling\ price}\). If cost is $80 and price is $100, margin is 20%.

Common pricing mistakes

  • Using markup and margin as if they are the same percentage.
  • Forgetting per-unit shipping, packaging, payment fees, or marketplace fees.
  • Applying discounts without checking post-discount margin.
  • Rounding the price and not rechecking the final profit.

Markup vs margin table

Markup on cost Equivalent gross margin
10%9.09%
25%20.00%
50%33.33%
100%50.00%

Calculation Method

Last updated: July 7, 2026. Formulas reviewed by Starlight Tools. All calculations run in your browser; the values you enter are not sent to a server.

  • Gross profit = selling price - cost.
  • Markup % = gross profit / cost.
  • Gross margin % = gross profit / selling price.
  • Cost as % of sales = cost / selling price.
  • Discounted price = selling price × (1 - discount).

Definition references: Investopedia on profit margin vs. markup and Investopedia on gross margin.

Markup and Margin FAQ

What is the difference between markup and margin?

Markup is gross profit divided by cost. Gross margin is gross profit divided by selling price or revenue. A 50% markup is not a 50% margin because the denominator changes.

How do I calculate selling price from cost and markup?

Use selling price = cost × (1 + markup). For example, an $80 cost with a 25% markup gives a $100 selling price.

How do I calculate selling price from cost and margin?

Use selling price = cost ÷ (1 - margin). For example, an $80 cost with a 20% target margin gives a $100 selling price.

What costs should I include?

Include the variable costs needed to make or sell one unit when you want a real unit margin. That can include product cost, inbound shipping, packaging, payment fees, marketplace fees, customer acquisition cost, and other per-unit costs.

Does sales tax affect margin?

Sales tax or VAT is usually collected on top of the selling price and passed through to the tax authority, so it normally does not change pre-tax markup or gross margin.

Why does a 50% markup not mean a 50% margin?

A 50% markup on an $80 cost produces a $120 price and $40 profit. The margin is $40 divided by $120, or 33.33%, because margin uses selling price as the base.

What is a good gross margin?

A good gross margin depends on industry, product category, fulfillment model, and operating costs. Use the calculator to test whether the gross profit left after variable costs can support overhead, marketing, returns, and profit targets.

Can gross margin be 100%?

A 100% gross margin would mean cost is zero and all revenue is gross profit. It is mathematically possible but uncommon for products with real variable costs. Gross margin cannot exceed 100% if selling price is positive and cost is non-negative.

Explore more tools