CalculatorMasters

Profit Margin Formula

Learn the formulas used to calculate profit, profit margin, markup, and cost ratio from revenue and cost.

The Profit Margin Calculator estimates how much money is left after costs and how that profit compares with revenue and cost. Understanding these formulas helps with pricing, product analysis, and basic business performance checks.

  • 100% Free
  • No Sign-Up Required
  • Private & Secure
  • Mobile Friendly

Profit Margin

Profit Margin = ((Revenue - Cost) / Revenue) × 100

Where:

Subtract cost from revenue to get profit, then divide profit by revenue and multiply by 100 to express it as a percentage.

Variables Explained

VariableWhat It MeansUnit
revenue - RevenueThe total selling price or total income from the sale, product, service, or period being measured.currency
cost - CostThe total cost associated with that same sale, product, service, or period.currency
profit - ProfitThe amount left after cost is subtracted from revenue.currency
profitMargin - Profit MarginProfit expressed as a percentage of revenue.percent
markup - MarkupProfit expressed as a percentage of cost.percent
costRatio - Cost RatioCost expressed as a percentage of revenue.percent

Step-by-Step Calculation

1

Calculate profit

Profit is the basic amount earned after paying the related cost.

profit = revenue - cost

2

Calculate profit margin

Profit margin shows what share of revenue remains as profit.

profitMargin = (profit / max(revenue, 0.000001)) * 100

3

Calculate markup

Markup shows how much profit is earned relative to cost.

markup = (profit / max(cost, 0.000001)) * 100

4

Calculate cost ratio

Cost ratio shows how much of revenue is taken up by cost.

costRatio = (cost / max(revenue, 0.000001)) * 100

Example: Calculating margin from revenue and cost

Revenue$1,000
Cost$700
1

Profit

1,000 - 700

300

2

Profit margin

(300 / 1,000) × 100

30%

3

Markup

(300 / 700) × 100

42.86%

4

Cost ratio

(700 / 1,000) × 100

70%

Final Result

With revenue of $1,000 and cost of $700, profit is $300, profit margin is 30%, markup is 42.86%, and cost ratio is 70%.

Try the Calculator →

Assumptions

  • Revenue and cost refer to the same product, service, order, project, or time period.
  • The calculation uses simple gross profit relationships based only on the values entered.
  • Any taxes, overhead, shipping, discounts, fees, or financing costs are only included if they are already built into the input numbers.
  • Results are estimates and depend on the accuracy and consistency of the figures provided.

Limitations

  • !The formulas do not distinguish between gross profit, operating profit, and net profit unless the user defines cost accordingly.
  • !A high margin does not always mean high total profit if sales volume is low.
  • !The calculator does not model break-even points, cash flow timing, or multi-product business performance.
  • !Very small or zero revenue values can make percentage results less meaningful in real-world analysis.

Common Mistakes to Avoid

1

Comparing revenue for one period with cost from a different period.

2

Mixing direct costs with total business overhead without deciding which profit view is being measured.

3

Confusing profit margin with markup even though they use different denominators.

4

Leaving out discounts, refunds, or transaction fees from revenue.

5

Entering cost higher than revenue and assuming the negative margin is an error when it may reflect a real loss.

Related Formulas

Frequently Asked Questions

What is the formula for profit margin?

Profit margin is calculated as profit divided by revenue, multiplied by 100. Profit itself is revenue minus cost.

What is the formula for profit?

Profit equals revenue minus cost.

What is the difference between margin and markup in the formula?

Margin divides profit by revenue, while markup divides profit by cost. Because the denominator changes, the percentages are different.

How do you calculate cost ratio?

Cost ratio is cost divided by revenue, multiplied by 100. It shows how much of revenue is consumed by cost.

Can profit margin be negative?

Yes. If cost is greater than revenue, profit is negative, which creates a negative profit margin.

Why does the formula use max(revenue, 0.000001)?

It prevents division by zero in the calculation logic. In practical use, a revenue value of zero means margin and cost ratio percentages are not very useful.

Ready to calculate your result?

Use the calculator to get instant results with your own inputs.

Try Profit Margin