Profit Margin Calculator Formula
Understand the math behind the profit margin calculator. Each variable explained with a worked example.
Formulas Used
Profit Margin
profit_margin = revenue > 0 ? ((revenue - total_costs) / revenue) * 100 : 0Net Profit
net_profit = revenue - total_costsCost-to-Revenue Ratio
cost_ratio = revenue > 0 ? (total_costs / revenue) * 100 : 0Variables
| Variable | Description | Default |
|---|---|---|
revenue | Total Revenue(USD) | 150000 |
total_costs | Total Costs(USD) | 120000 |
How It Works
How to Calculate Profit Margin
Formula
Profit Margin % = [(Revenue - Total Costs) / Revenue] x 100
Profit margin is one of the most critical measures of business health. It shows how much of each dollar in revenue your business keeps as profit after paying all expenses.
Worked Example
A business earns $150,000 in revenue with $120,000 in total costs.
- 01Net profit = $150,000 - $120,000 = $30,000
- 02Profit margin = ($30,000 / $150,000) x 100 = 20%
- 03Cost-to-revenue ratio = ($120,000 / $150,000) x 100 = 80%
Frequently Asked Questions
What is a healthy profit margin?
It depends on the industry. Service businesses often have 15-25% net margins. Retail typically has 2-5%. Software and SaaS can reach 30-80%. Restaurants average 3-9%. Always compare against your specific industry average rather than a universal benchmark.
What is the difference between profit margin and gross margin?
Gross margin only subtracts the direct cost of goods sold (COGS) from revenue. Profit margin (net margin) accounts for all costs including COGS, operating expenses, overhead, interest, and taxes — it is the most comprehensive measure of profitability.
What is the difference between profit margin and markup?
Profit margin is profit as a percentage of revenue (selling price). Markup is profit as a percentage of cost. A product that costs $60 and sells for $100 has a 40% profit margin and a 66.7% markup. Knowing the difference is critical for pricing strategy.
How can I improve my profit margin?
The two main levers are increasing revenue and decreasing costs. Specific strategies include raising prices (even small increases have a large impact on margin), reducing COGS through better supplier deals, cutting overhead, focusing on higher-margin products or services, and improving operational efficiency.
Learn More
Guide
How to Calculate Profit Margin
Learn how to calculate gross, operating, and net profit margins step by step. Understand what healthy margins look like across industries and how to improve yours.
Ready to run the numbers?
Open Profit Margin Calculator