- Overview
- Calculators
- Margin Calculator
Margin Calculator
This margin calculator instantly computes profit margin, selling price, or cost when given any two values. Enter your numbers to see margin percentage, profit amount, and the equivalent markup percentage in real time.
Calculate Profit Margin
Select a calculation mode and enter your values to calculate margin, selling price, or cost.
Important: Margin can never be 100% or higher. A 100% margin would require a cost of $0, which is practically impossible. Markup, however, can exceed 100%.
Margin vs Markup Comparison
| Margin % | Markup % | Factor |
|---|---|---|
| 10% | 11.11% | x1.1111 |
| 20% | 25.00% | x1.2500 |
| 30% | 42.86% | x1.4286 |
| 40% | 66.67% | x1.6667 |
| 50% | 100.00% | x2.0000 |
Frequently Asked Questions
What is profit margin?
Profit margin is the percentage of revenue that remains as profit after subtracting costs. It is calculated as ((Revenue - Cost) / Revenue) x 100. For example, if you sell an item for $100 that costs $60, your profit margin is (($100 - $60) / $100) x 100 = 40%. Margin tells you what portion of each dollar of revenue is profit.
How do you calculate profit margin?
Profit Margin (%) = ((Selling Price - Cost) / Selling Price) x 100. For example, if you buy a product for $30 and sell it for $50: Margin = (($50 - $30) / $50) x 100 = 40%. This means 40% of the revenue is profit. You can also calculate the selling price from margin: Selling Price = Cost / (1 - Margin / 100).
What is the difference between margin and markup?
Margin and markup both measure profit but use different bases. Margin is profit as a percentage of the selling price (revenue), while markup is profit as a percentage of the cost. For example, buying at $60 and selling at $100: Margin = ($40 / $100) x 100 = 40%, Markup = ($40 / $60) x 100 = 66.7%. Margin is always lower than markup for the same transaction.
What is a good profit margin?
A good profit margin varies by industry. Software and technology companies often achieve 60-90% gross margins. Retail businesses typically see 25-50% gross margins. Restaurants and food service usually operate at 3-9% net margins. Manufacturing averages 10-20% gross margins. A 'good' margin depends on your industry, business model, and operating costs. Higher margins generally indicate better pricing power and efficiency.
Can margin be over 100%?
No, profit margin can never be 100% or higher. Since margin is calculated as (Revenue - Cost) / Revenue, the cost would need to be zero or negative for margin to reach or exceed 100%. A cost of $0 would mean 100% margin, but this is practically impossible because there is always some cost involved. Markup, on the other hand, can exceed 100% - a 150% markup on a $40 cost means selling at $100.
What is gross margin vs net margin?
Gross margin measures profit after subtracting only the direct cost of goods sold (COGS) from revenue. Net margin measures profit after subtracting ALL expenses, including COGS, operating costs, taxes, interest, and overhead. For example, if revenue is $500,000, COGS is $200,000, and total expenses are $400,000: Gross margin = ($300,000 / $500,000) x 100 = 60%, Net margin = ($100,000 / $500,000) x 100 = 20%.
How to convert margin to markup?
Markup (%) = (Margin% / (100 - Margin%)) x 100. For example, a 40% margin converts to: (40 / (100 - 40)) x 100 = (40 / 60) x 100 = 66.67% markup. Conversely, to convert markup to margin: Margin (%) = (Markup% / (100 + Markup%)) x 100. A 66.67% markup converts to: (66.67 / 166.67) x 100 = 40% margin.
Why is margin important for businesses?
Margin is critical because it directly indicates business profitability and sustainability. It helps set competitive prices while ensuring profitability, enables comparison across products and time periods, informs decisions about which products to promote or discontinue, and is a key metric investors and lenders evaluate. Declining margins can signal rising costs, pricing pressure, or operational inefficiency that needs to be addressed.
Understanding Profit Margin and How to Calculate It
What is Profit Margin?
Profit margin is one of the most fundamental metrics in business and finance. It represents the percentage of revenue that remains as profit after all relevant costs have been subtracted. In simple terms, margin tells you how many cents of every dollar earned actually become profit.
For example, if a company generates $1,000,000 in revenue and has $600,000 in costs, its profit margin is 40%. This means that for every dollar of revenue, the company keeps $0.40 as profit. The remaining $0.60 covers costs such as materials, labor, overhead, and other expenses.
Profit margin is expressed as a percentage and is calculated by dividing profit by revenue, then multiplying by 100. It is a relative measure, meaning it allows you to compare profitability across companies, products, and time periods regardless of their absolute size. A small business earning $50,000 profit on $200,000 revenue has the same 25% margin as a large corporation earning $25 million on $100 million revenue.
Understanding margin is essential for pricing strategy, financial planning, cost management, and investment analysis. Businesses use margin to set prices that ensure profitability, identify underperforming products, and make strategic decisions about resource allocation. Investors use margin to evaluate a company's efficiency and competitive position within its industry.
One critical characteristic of margin is that it can never reach 100%. Since margin is calculated as profit divided by revenue, the only way to achieve a 100% margin would be to have zero costs, which is practically impossible. Even digital products have development, hosting, and marketing costs. This mathematical ceiling distinguishes margin from markup, which has no upper limit.
Types of Margin
There are three primary types of profit margin that businesses and analysts use, each measuring profitability at a different level of the income statement. Understanding the differences between these margins helps provide a complete picture of a company's financial health.
Gross Margin
Gross margin (also called gross profit margin) measures the percentage of revenue remaining after subtracting only the direct cost of goods sold (COGS). COGS includes the direct materials and direct labor needed to produce the goods or services sold. It does not include indirect costs like rent, marketing, or administrative salaries.
Gross margin is calculated as: ((Revenue - COGS) / Revenue) x 100. For a retailer who purchases products at $60 and sells them at $100, the gross margin is (($100 - $60) / $100) x 100 = 40%. This means 40 cents of every sales dollar covers costs beyond the product itself.
Gross margin is particularly useful for understanding pricing effectiveness and production efficiency. A declining gross margin may indicate rising material costs, pricing pressure from competitors, or inefficient production processes. It is the most commonly used margin type when discussing product-level profitability.
Operating Margin
Operating margin (also called operating profit margin or EBIT margin) takes gross profit and subtracts operating expenses such as rent, utilities, salaries, marketing, depreciation, and other overhead costs. It measures the profitability of the company's core business operations before interest and taxes.
Operating margin is calculated as: (Operating Income / Revenue) x 100, where Operating Income = Revenue - COGS - Operating Expenses. If a company has $500,000 in revenue, $200,000 in COGS, and $150,000 in operating expenses, its operating margin is (($500,000 - $200,000 - $150,000) / $500,000) x 100 = 30%.
This metric is valuable because it shows how efficiently a company manages all its operational costs, not just direct production costs. A company can have a strong gross margin but a weak operating margin if its overhead costs are too high. Comparing operating margins between companies in the same industry reveals which ones run their operations most efficiently.
Net Margin
Net margin (also called net profit margin or bottom-line margin) is the most comprehensive profitability measure. It accounts for ALL expenses including COGS, operating expenses, interest on debt, taxes, and any other costs. It represents the final percentage of revenue that becomes actual profit for the business owners or shareholders.
Net margin is calculated as: (Net Income / Revenue) x 100. Using our previous example, if the company also pays $20,000 in interest and $30,000 in taxes, its net margin is (($500,000 - $200,000 - $150,000 - $20,000 - $30,000) / $500,000) x 100 = 20%.
Net margin gives the truest picture of how much money a company actually keeps. However, it can be distorted by one-time events (such as asset sales or lawsuit settlements) and varies significantly based on capital structure (how much debt a company carries) and tax jurisdiction. For this reason, analysts often use all three margin types together to get a complete understanding of profitability.
How to Use This Calculator
Our margin calculator offers three calculation modes to solve any margin-related problem. Simply select the mode that matches what you want to find, enter your known values, and the calculator provides instant results.
- Find Margin %: Enter the cost and selling price (revenue). The calculator computes the margin percentage, profit amount, and equivalent markup percentage. Use this when you know what you paid and what you sold for, and want to know your margin.
- Find Selling Price: Enter the cost and your desired margin percentage. The calculator computes the required selling price, profit amount, and equivalent markup. Use this when setting prices to achieve a target margin.
- Find Cost: Enter the selling price (revenue) and margin percentage. The calculator computes the maximum cost you can pay while maintaining that margin. Use this for procurement decisions and cost budgeting.
- Use the quick preset buttons (10%, 15%, 20%, 25%, 30%, 40%, 50%) to rapidly set common margin targets without typing
- Review the Margin vs Markup comparison table to understand how your margin translates to markup and vice versa
- Click the Copy button to copy all results to your clipboard for use in spreadsheets, reports, or messages
Margin Formulas
All margin calculations derive from the fundamental relationship between revenue, cost, and profit. Below are the key formulas used in this calculator, along with their derivations and practical applications.
Margin Percentage:
Margin % = ((Revenue - Cost) / Revenue) x 100
Margin % = (Profit / Revenue) x 100
The margin formula divides profit by revenue. This tells you what fraction of each dollar of revenue is profit. For instance, if you sell a product for $80 that cost you $50, the margin is (($80 - $50) / $80) x 100 = 37.5%. Note that the denominator is revenue (the selling price), not cost. This is the fundamental difference between margin and markup.
Selling Price from Margin:
Selling Price = Cost / (1 - Margin% / 100)
This formula is derived by rearranging the margin equation. To find the selling price needed to achieve a specific margin, divide the cost by (1 minus the decimal margin). For example, if your cost is $60 and you want a 40% margin: $60 / (1 - 0.40) = $60 / 0.60 = $100. You can verify: ($100 - $60) / $100 = 40%.
Cost from Margin:
Cost = Revenue x (1 - Margin% / 100)
To find the maximum allowable cost that maintains a target margin, multiply revenue by (1 minus the decimal margin). If your selling price is $100 and you need a 35% margin: $100 x (1 - 0.35) = $100 x 0.65 = $65 maximum cost. Any cost above $65 would result in a margin lower than 35%.
Margin to Markup Conversion:
Markup % = (Margin% / (100 - Margin%)) x 100
Margin % = (Markup% / (100 + Markup%)) x 100
These conversion formulas allow you to switch between margin and markup without needing to know the actual dollar amounts. A 25% margin equals a 33.33% markup: (25 / 75) x 100 = 33.33%. Conversely, a 33.33% markup equals a 25% margin: (33.33 / 133.33) x 100 = 25%. These conversions are useful when suppliers quote markup but you think in terms of margin, or vice versa.
Margin vs Markup: Understanding the Difference
Margin and markup are two different ways of expressing the same profit amount as a percentage. They are frequently confused, but understanding the distinction is critical for accurate pricing, financial reporting, and business communication. Getting them mixed up can lead to pricing errors that significantly impact profitability.
Margin expresses profit as a percentage of the selling price (revenue). It answers the question: "What percentage of my revenue is profit?" The base for the calculation is what the customer pays.
Markup expresses profit as a percentage of the cost. It answers the question: "How much more than my cost am I charging?" The base for the calculation is what you paid for the item.
Consider an item purchased for $40 and sold for $100. The profit is $60 in both cases, but the percentages differ dramatically:
- Margin = $60 / $100 = 60%
- Markup = $60 / $40 = 150%
The same $60 profit is a 60% margin but a 150% markup. This shows why it is essential to clarify which metric you are using in business conversations. Saying "we need 60% on this product" means very different prices depending on whether 60% refers to margin or markup.
A key mathematical property: margin is always less than markup for any profitable transaction. As margin approaches 100%, markup approaches infinity. A 50% margin equals a 100% markup. A 90% margin equals a 900% markup. Conversely, low margins and markups are similar: a 10% margin equals an 11.11% markup.
Another important distinction: margin has a theoretical maximum of 100% (never achievable in practice), while markup has no upper limit. You can have a 500% markup (selling something for 6 times its cost), but you can never have a 500% margin.
For more detailed markup calculations, use our Markup Calculator to compute selling prices, costs, and markup percentages.
Real-World Examples
Example 1: Retail Clothing Store
A boutique purchases a dress from a wholesaler for $45 and wants to sell it at a 55% margin. What should the selling price be, and what is the profit per unit?
Selling Price = $45 / (1 - 0.55) = $45 / 0.45 = $100.00
Profit = $100.00 - $45.00 = $55.00
Equivalent Markup = 55 / (100 - 55) x 100 = 122.22%
The store should price the dress at $100.00 to achieve a 55% margin, earning $55.00 profit per unit. This is equivalent to a 122.22% markup on the wholesale cost. The retailer can then evaluate whether this price point is competitive in their market while meeting their profitability targets. If the $100 price is too high for their customers, they may need to negotiate a lower wholesale cost or accept a lower margin.
Example 2: SaaS Company
A software company charges $200/month for their service. Their direct costs (hosting, support, payment processing) per customer are $30/month. What is their gross margin?
Margin = (($200 - $30) / $200) x 100 = 85%
Profit per customer = $170/month
Equivalent Markup = 85 / (100 - 85) x 100 = 566.67%
The SaaS company enjoys an 85% gross margin, which is typical for software businesses. The high margin (equivalent to a 566.67% markup) reflects the scalability of software: the direct cost per customer is relatively fixed while revenue scales linearly. However, the SaaS company also has significant operating expenses (engineering salaries, marketing, sales) that are not included in this gross margin calculation. Their net margin after all expenses might be 10-25%, which is still healthy for the industry.
Example 3: Restaurant Menu Pricing
A restaurant wants to maintain a 70% gross margin on a pasta dish. The ingredient cost (food cost) for the dish is $4.50. What should the menu price be?
Menu Price = $4.50 / (1 - 0.70) = $4.50 / 0.30 = $15.00
Profit = $15.00 - $4.50 = $10.50
Equivalent Markup = 70 / (100 - 70) x 100 = 233.33%
The dish should be priced at $15.00 to hit the 70% gross margin target. In the restaurant industry, this is commonly expressed as a "food cost percentage" of 30% (the inverse of the 70% margin). The $10.50 gross profit per dish needs to cover labor, rent, utilities, equipment, and other overhead costs. Most restaurants target a food cost between 25-35%, depending on the type of establishment. Fine dining may accept higher food costs (lower margins per dish) because they charge higher prices overall and create perceived value through ambiance and service.
Use Cases
Margin calculations are essential across virtually every business function and industry. Here are the most common use cases where understanding and calculating margin is critical to making sound business decisions.
- Product pricing: Setting prices that achieve target profit margins while remaining competitive. Margin-based pricing ensures every product contributes adequately to covering overhead costs and generating profit. Businesses typically set different margin targets for different product categories based on volume, competition, and perceived value.
- Financial analysis: Evaluating company profitability over time by tracking gross, operating, and net margins. Trending margins reveal whether a business is becoming more or less efficient. Analysts compare margins across quarters and years to identify operational improvements or emerging problems.
- Competitive benchmarking: Comparing your margins against industry averages and competitors to identify strengths and weaknesses. If your margin is significantly below the industry average, it may indicate pricing power issues or cost inefficiencies that need attention.
- Procurement decisions: Determining the maximum price you can pay for goods while maintaining target margins. When negotiating with suppliers, knowing your margin threshold helps you set clear walk-away prices and evaluate competing supplier offers objectively.
- Product mix optimization: Analyzing which products or services have the highest margins to focus sales and marketing efforts. Shifting the product mix toward higher-margin items can dramatically improve overall profitability without increasing total revenue.
- Investor evaluation: Margin trends are key indicators for investors assessing a company's health. Expanding margins suggest improving efficiency or pricing power, while contracting margins may signal competitive pressure or rising costs. Margin analysis is a staple of fundamental stock analysis.
- Break-even analysis: Understanding margins helps calculate the sales volume needed to cover all fixed costs. If your gross margin is 40%, you need $250,000 in revenue to cover $100,000 in fixed costs ($100,000 / 0.40 = $250,000). Lower margins require higher sales volumes to break even.
- Discount decision-making: When considering offering discounts, margin analysis shows the impact on profitability. A 10% price reduction on a product with a 30% margin doesn't reduce profit by 10% - it reduces it by 33%. Understanding this relationship prevents underpricing during sales and promotions.
Industry Benchmarks
Profit margins vary dramatically across industries due to differences in business models, capital requirements, competition, and cost structures. Understanding typical margins for your industry helps you set realistic targets and identify areas for improvement. Below are representative gross margin ranges for major industry sectors.
Software & Technology
Gross margins: 60-90%. Software companies enjoy the highest margins in business because software can be replicated at near-zero marginal cost. SaaS companies typically see 70-85% gross margins. Once the development cost is covered, each additional customer adds mostly revenue with minimal incremental cost. However, the industry requires heavy R&D investment, so operating and net margins are lower, typically 15-35% for profitable companies.
Retail
Gross margins: 25-50%. Retail margins vary widely by category. Grocery stores operate on thin margins (2-5% net), while specialty retail and luxury goods can achieve 50-65% gross margins. E-commerce businesses typically have higher gross margins than brick-and-mortar stores because they avoid retail space costs, but they face higher shipping and return costs. The key to retail profitability is volume and inventory turnover.
Manufacturing
Gross margins: 10-35%. Manufacturing margins are compressed by high material and labor costs. Commodity manufacturers (steel, chemicals) operate at the lower end with 10-15% gross margins, while specialty and branded manufacturers can achieve 30-40%. Efficiency improvements, automation, and economies of scale are critical for maintaining margins in this capital-intensive industry.
Restaurants & Food Service
Gross margins: 60-75% (on food), Net margins: 3-9%. While the gross margin on individual menu items is high (food cost is typically 25-35% of menu price), restaurants face heavy labor costs (25-35% of revenue) and occupancy costs (5-10% of revenue). The combination of perishable inventory, high labor needs, and fixed overhead makes food service one of the most challenging industries for profitability. Successful restaurants focus on high-margin items like beverages and desserts to improve overall margins.
Professional Services
Gross margins: 50-80%. Consulting, legal, accounting, and other professional services have high margins because the primary cost is personnel, with minimal material costs. The margin primarily reflects the spread between what clients pay and what practitioners earn. However, utilization rates (the percentage of time professionals spend on billable work) significantly impact actual margins. Most firms target 60-75% utilization, and margins suffer quickly when utilization drops.
Healthcare & Pharmaceuticals
Gross margins: 60-80% (pharmaceuticals), 30-50% (healthcare services). Pharmaceutical companies have high gross margins reflecting the value of intellectual property and R&D investment. However, when amortized R&D costs are included, effective margins are lower. Healthcare service providers (hospitals, clinics) operate on moderate margins due to high labor costs, regulatory compliance costs, and payer mix challenges. The industry faces ongoing margin pressure from insurance negotiations and regulatory changes.
Remember that these are gross margin ranges. Operating and net margins will be lower after accounting for overhead, marketing, R&D, interest, and taxes. When benchmarking your business, compare like-for-like: gross margin to gross margin, net margin to net margin. Cross-margin-type comparisons are meaningless.
For more calculations related to pricing and profitability, try our Markup Calculator to compute prices using markup percentages instead of margin.