Profit Margin Calculator - Gross Margin, Markup & Selling Price

Calculate gross profit, profit margin percentage, and markup percentage from cost and selling price—or solve for the right selling price from your target gross margin or markup goal with exact formulas visible.

Profit Margin Calculator

How to use the Profit Margin Calculator

  1. 1Select Cost + Selling Price, Cost + Target Margin %, or Cost + Target Markup % at the top.
  2. 2Type your Cost of Goods and second value (Selling Price, Margin %, or Markup %).
  3. 3Review Selling Price, Gross Profit, Gross Margin %, and Markup % in the four summary cards.
  4. 4Verify the active Formula Box at the bottom or click Copy Result.

What the Profit Margin Calculator does

All pricing calculations run locally inside your browser using three exact algebraic modes:

  • Cost + Selling Price: Profit = Price - Cost, Gross Margin % = (Profit / Price) × 100, Markup % = (Profit / Cost) × 100.
  • Cost + Target Margin %: Selling Price = Cost / (1 - Margin / 100), enforcing Margin < 100%.
  • Cost + Target Markup %: Selling Price = Cost × (1 + Markup / 100), plus resulting Profit and Gross Margin %.
  • Displays the exact formula for whichever mode you select alongside a one-click Copy Result button.

Example

Sample pricing calculation (Cost + Selling Price mode)
Cost of Goods: 60 | Selling Price: 100
Calculated profit metrics
Selling Price: 100.00 | Gross Profit: 40.00 | Gross Margin: 40% | Markup: 66.67%

Because Profit (40) is divided by Price (100) for margin and divided by Cost (60) for markup, markup is always higher than margin when cost is positive.

Frequently asked questions

What is the difference between gross margin and markup?

Gross margin measures profit as a percentage of Selling Price: (Profit / Price) × 100. Markup measures profit as a percentage of Cost: (Profit / Cost) × 100. For a $60 item sold at $100, profit is $40, margin is 40%, and markup is 66.67%.

How do I price an item to hit a target profit margin?

Choose Cost + Target Margin % mode, which evaluates Selling Price = Cost / (1 - Margin / 100). For instance, to make a 40% margin on a $60 cost, sell at 60 / (1 - 0.40) = $100.

What formulas does this calculator run?

Mode 1 computes Profit = Price - Cost, Margin % = (Profit / Price) × 100, and Markup % = (Profit / Cost) × 100. Mode 2 computes Price = Cost / (1 - Margin / 100). Mode 3 computes Price = Cost × (1 + Markup / 100).

Why does Target Gross Margin stop below 100%?

When cost is positive, dividing Cost by (1 - 100/100) divides by zero; a gross margin of 100% or higher on positive cost is mathematically impossible.

Related tools

View All Tools