calculate margin

Margin Calculator

Use this tool to calculate gross profit margin, markup, and total profit. You can also enter a target margin to see the selling price you need.

If left blank, the calculator assumes 1 unit.

Useful when pricing new products or services.

What it means to calculate margin

When people say “calculate margin,” they usually mean finding out how much of each sale remains as profit after direct costs. Margin gives you a clean profitability signal because it shows profit as a percentage of revenue, not just a dollar amount.

If your selling price is $100 and your direct cost is $60, your profit is $40. Your margin is 40% because $40 is 40% of $100. This is why margin is so useful: it normalizes profit and makes comparisons easier across products, services, and time periods.

Margin vs. markup: the most common confusion

These two terms are related, but they are not the same:

  • Margin is based on selling price.
  • Markup is based on cost.

A product with 50% markup does not have a 50% margin. In fact, a 50% markup equals a 33.33% margin. Mixing these up can cause underpricing and unexpected profit shortfalls.

Core formulas:
Margin % = ((Selling Price − Cost) ÷ Selling Price) × 100
Markup % = ((Selling Price − Cost) ÷ Cost) × 100
Required Price for Target Margin = Cost ÷ (1 − Target Margin)

How to use margin in real decisions

1) Pricing products

Start with true direct cost: unit cost, shipping, payment processing fees, and packaging. Then set a target margin that supports overhead and growth. If your margin is too thin, even high sales volume can fail to generate healthy net profit.

2) Quoting services

For freelancers and agencies, “cost” includes labor time, software, subcontractors, and project risk. A quote that looks large can still have weak margin if delivery takes longer than expected. Estimate conservatively and protect your margin with scope boundaries.

3) Running promotions

Discounts reduce margin quickly. Before a promotion, calculate post-discount margin and make sure it still works. If not, bundle items, raise minimum order values, or apply discounts to higher-margin offers only.

Example calculations

Retail example

A store buys a product for $32 and sells it for $55:

  • Profit per unit: $23
  • Margin: 41.82%
  • Markup: 71.88%

With 200 units sold, total gross profit becomes $4,600. This is where unit economics and volume combine to show business impact.

Consulting example

A consultant estimates $900 in direct delivery cost and proposes a $1,500 project fee:

  • Profit: $600
  • Margin: 40%

If the consultant wants a 50% margin instead, the required price is $1,800. That quick target-based calculation prevents pricing too low.

Tips to improve margin without hurting customer value

  • Negotiate supplier terms and reduce avoidable fulfillment costs.
  • Improve onboarding and delivery efficiency to cut labor waste.
  • Shift marketing toward higher-margin products or services.
  • Package offers (bundles, retainers, tiers) to increase average order value.
  • Use data-driven price tests rather than one-time guesswork.

Common margin mistakes to avoid

  • Forgetting transaction fees, returns, and shipping adjustments.
  • Using markup targets when the business is managed by margin goals.
  • Assuming high revenue equals high profitability.
  • Ignoring low-margin “popular” products that drag down overall performance.
  • Running discounts without checking post-discount unit economics.

Final thought

If you calculate margin consistently, pricing becomes strategic instead of emotional. You can protect profitability, forecast growth with more confidence, and make faster decisions on products, projects, and promotions.

🔗 Related Calculators