Margin Calculator

Calculate gross margin, markup, and profit.

Calculators

How to Use Margin Calculator

  1. 1Enter cost and revenue to get margin and markup
  2. 2Or enter cost and target margin to find the required price
  3. 3Or enter revenue and margin to find cost

About Margin Calculator

The Margin Calculator helps businesses understand their profitability metrics from multiple directions. Enter cost and revenue to instantly calculate gross margin percentage, markup percentage, and gross profit in currency terms.

The calculator also works in reverse: enter a cost and target margin percentage to find the selling price you need to hit that margin, or enter revenue and target margin to determine the maximum allowable cost. This flexibility makes it useful for pricing strategy as well as financial reporting.

All calculations run locally in your browser with no data sent to any server, so sensitive pricing and cost information stays private. The tool is designed for entrepreneurs, product managers, and financial analysts who need fast and accurate profitability figures.

Key Features of Margin Calculator

  • Calculate gross margin % from cost and revenue
  • Calculate markup % from cost and profit
  • Compute gross profit amount in currency terms
  • Reverse calculation: find selling price from cost and target margin
  • Reverse calculation: find cost from revenue and target margin
  • Handles any currency — enter amounts in your local denomination
  • Shows all three metrics simultaneously
  • Instant results with clear formula explanations

Examples

Calculate margin from cost and revenue

Find the gross margin and markup for a product costing 40 and selling for 60.

Input

Cost: 40, Revenue: 60

Output

Gross profit: 20 | Margin: 33.33% | Markup: 50%

Find selling price from target margin

Determine what selling price achieves a 40% margin on a product costing 60.

Input

Cost: 60, Target margin: 40%

Output

Selling price: 100 | Gross profit: 40

Common Use Cases

  • Setting product prices to achieve a target profit margin
  • Comparing profitability across different product lines
  • Checking whether a proposed price covers costs and meets margin targets
  • Presenting gross margin metrics in investor or management reports
  • Evaluating supplier cost changes and their impact on margins
  • Determining the minimum selling price needed to stay profitable

Troubleshooting

Confusing margin with markup

Solution

Margin uses revenue as the denominator (Profit / Revenue). Markup uses cost as the denominator (Profit / Cost). A 33.33% margin equals a 50% markup on the same transaction.

Entering cost greater than revenue

Solution

If cost exceeds revenue, the margin is negative, indicating a loss. The calculator will show a negative margin, which is a valid and informative result.

Entering a target margin of 100% or above

Solution

A 100% margin is impossible because it would require zero cost. Gross margin must always be below 100%. If you need a specific profit multiple, use markup mode instead.

Frequently Asked Questions

What is the difference between margin and markup?

Margin = (Revenue - Cost) / Revenue x 100. Markup = (Revenue - Cost) / Cost x 100. For the same transaction, markup is always a higher percentage than margin. A 50% markup on a 40 item gives a 33.33% margin.

How do I find the selling price for a target margin?

Use the reverse mode: enter your cost and target margin percentage. The formula is Selling Price = Cost / (1 - margin/100). For example, a 40% margin on a 60 cost gives a selling price of 100.

What is gross margin vs net margin?

Gross margin only deducts the cost of goods sold (COGS) from revenue. Net margin deducts all expenses including operating costs, taxes, and interest. This calculator computes gross margin.

Can I calculate markup instead of margin?

Yes. The calculator shows markup percentage alongside margin whenever you enter cost and revenue. Markup = (Profit / Cost) x 100.

Why is margin always lower than markup for the same deal?

Margin uses the larger number (revenue) as the denominator, while markup uses the smaller number (cost). Dividing the same profit by a larger number always gives a lower percentage.

What does a negative margin mean?

A negative margin means the revenue is less than the cost — you are selling at a loss. The calculator will show the negative figure to make the loss visible.

Can I use this for service businesses?

Yes. Replace "cost" with your total labor and material costs for a service engagement, and "revenue" with the amount you charge the client. The margin calculation is identical.

Is my data private?

Yes. All calculations run entirely in your browser. No financial data is transmitted to or stored on any server.