Margin Calculator
Free margin calculator to calculate profit margin, markup, required selling price for a target margin, stock trading margin, and currency exchange margin.
Calculator
Calculate the profit margin of making, trading products, or doing business in general. Provide any two values below to compute the rest.
| Margin: | 37.50% |
| Profit: | $30.00 |
| Markup: | 60.00% |
| Cost / Revenue Ratio: | 62.5% |
Margin vs Markup Comparison
| Item | Margin View | Markup View |
|---|---|---|
| Cost | $50.00 | $50.00 |
| Revenue | $80.00 | $80.00 |
| Profit | $30.00 | $30.00 |
| Ratio | 37.50%(Margin (% of Revenue)) | 60.00%(Markup (% of Cost)) |
Key Insight: A 37.5% margin equals a 60.0% markup. Markup is always higher than margin for the same transaction because it uses cost (a smaller base) rather than revenue. To convert margin to markup: Markup = Margin / (1 - Margin). To convert markup to margin: Margin = Markup / (1 + Markup).
Profit Margin Benchmarks by Industry
Compare your margins against industry averages. These are general guidelines; actual margins vary by business model, size, and market conditions.
| Industry | Gross Margin | Net Margin | Notes |
|---|---|---|---|
| Software / SaaS | 70% - 85% | 15% - 30% | High margins, low COGS |
| Financial Services | 60% - 80% | 20% - 40% | Regulatory costs vary |
| Healthcare | 50% - 70% | 10% - 20% | High R&D and regulatory costs |
| Real Estate | 40% - 60% | 10% - 25% | Leverage-dependent |
| Professional Services | 50% - 70% | 15% - 25% | Labor-intensive |
| Retail (General) | 25% - 50% | 2% - 8% | High volume, low margin |
| Grocery / Food Retail | 15% - 30% | 1% - 3% | Razor-thin margins |
| Restaurants | 30% - 45% | 3% - 10% | High fixed costs |
| Manufacturing | 20% - 40% | 5% - 15% | Capital-intensive |
| Construction | 15% - 30% | 3% - 10% | Project-dependent |
| Transportation / Logistics | 20% - 35% | 3% - 8% | Fuel cost sensitive |
| Telecommunications | 50% - 65% | 10% - 20% | High infrastructure costs |
| E-commerce | 30% - 50% | 3% - 15% | Fulfillment cost heavy |
| Pharmaceuticals | 70% - 90% | 15% - 25% | High R&D amortization |
| Oil & Gas | 40% - 60% | 5% - 15% | Commodity price driven |
Source: NYU Stern School of Business industry data, 2025. Margins approximate and will vary.
Results
Profit Margin
37.50%
Profit as a percentage of revenue
$30.00
Revenue minus cost
60.00%
Profit as a percentage of cost
62.50%
Cost as a share of revenue
Margin tab assumes gross profit (direct cost basis). Stock and currency margins show the initial requirement only and do not include brokerage fees, in-the-money interest, swaps, or maintenance rules.
Visualizations
Where Revenue Goes
Profit Margin
Formula
Margin measures profit as a share of what the customer pays (revenue), while markup measures it as a gain on what you spend (cost). Any two of the four inputs cost, revenue, margin, and profit solve the rest, and the target-margin formula finds the selling price that reaches your goal.
Alternative Form
Variables
| Symbol | Name | Unit | Description |
|---|---|---|---|
| Revenue | Revenue | USD | Money collected from sales |
| Cost | Cost | USD | The expense of acquiring or producing the product |
| Profit | Profit | USD | Revenue minus cost |
| Margin | Margin | % | Profit divided by revenue |
| Markup | Markup | % | Profit divided by cost |
| L | Leverage | ratio | Margin ratio, e.g. 20:1, defining FX position size |
Explanation
Every sale starts the same way: subtract what you spent from what you collected to get profit. Margin then answers, per dollar of revenue, how many cents survive as profit; markup answers how much the price exceeds what you paid. Both are useful selfsame ratios from opposite bases.
Derivation
Margin = (Revenue - Cost) / Revenue and markup = (Revenue - Cost) / Cost. Solving the margin equation for revenue gives Selling Price = Cost / (1 - Margin). For stock margin trading, required cash = Price × Shares × Margin%. For currency positions, margin = Exchange rate × Units / Leverage ratio.
Step-by-Step Calculation
Follow each step to understand how the result is calculated from your inputs.
Subtract the cost from the revenue to find the gross profit.
Divide the profit by revenue to express margin as a percentage of what was earned.
Divide the profit by cost to find the markup percentage.
Compare your margin to industry benchmarks on the table below.
Worked Examples
See how the calculator works with different scenarios.
Scenario
A product costs $50 and sells for $80.
Inputs
Calculation
Profit = 80 - 50 = $30 Margin = 30 / 80 × 100 = 37.50% Markup = 30 / 50 × 100 = 60%
Result
Profit of $30, a 37.50% margin, and a 60% markup
Interpretation
The same $30 appears as a bigger percentage under markup because cost ($50) is a smaller base than revenue ($80). Both numbers describe the identical transaction.
Understanding Your Result
Your Result: Profit Margin: 37.50%
Typical range: Software and pharma businesses commonly run gross margins of 70-90% while grocery sits at 15-30%. Net profit margins of 10-20% are considered healthy for most industries; below 5% is often thin once overhead is included.
What This Means
The primary tab converts cost and revenue into the three core pricing metrics: profit, margin, and markup. The markup, stock, currency, and goal tabs each solve a different pricing or leverage question without changing the base formulas.
Why It Matters
Margin drives pricing, profitability, and investor analysis, and markup drives retail pricing. Stock and forex margins control how much risk and buying power you hold, so knowing the amount required ahead is essential before any leveraged trade.
Professional Interpretation
By industry, professional graders use gross margin to measure pricing power and net margin to gauge overall efficiency. In trading accounts Reg T limits equity to 50% of the initial stock purchase while FINRA maintenance is 25%; forex brokers only require a small margin percentage, which is why leverage ratios appear so high.
Margin vs markup
Margin = Profit / Revenue shows the share of each sales dollar that is profit. Markup = Profit / Cost shows the percentage added on top of cost. A 50% margin equals a 100% markup, so the two are only interchangeable with a conversion formula.
Initial vs maintenance margin
Initial margin is the percentage you must put up to open the position (Reg T: 50%). Maintenance margin is the minimum equity you need to keep holding it, typically 25-30%. Falling below triggers the margin call.
High forex leverage
Forex margin ratios of 20:1 to 100:1 are common, meaning the exchange converts small capital into a large position. Gains and losses move at the full position size, not the margin — a 2% rate swing costs 40% of a 50:1 account.
Recommendations
- •Track margin, not just revenue, to catch cost inflation early
- •Use goal margin pricing for any product you want to reprice
- •Budget for margin maintenance, not only the initial requirement
- •Never treat a margin loan as free money — it carries interest and margin call risk
- •Benchmark against your industry on the table below
- •Distinguish gross margin (COGS only) from net margin (all costs)
Educational Content
Introduction
The Margin Calculator covers the three meanings of margin in finance: profit margin for products, trading margin for stocks, and exchange margin for currency positions. Four of the tabs are solved by the same margin equations from opposite bases.
Concept Explanation
Profit margin is profit divided by revenue; markup is profit divided by cost. Trading margin is the share of a purchase price your broker requires you to pay from your own cash, and exchange margin is the ratio between the position value and the amount deposited. Higher leverage means any currency move acts on a bigger notional size.
Applications
Benefits
- •Any two of four profit inputs solve the rest
- •Built-in markup and goal-margin tabs
- •Stock and FX margin calculators with leverage ratios
- •Industry benchmark table for context
- •Instant recalculations with no submitted forms
- •Simple, unambiguous formulas shown in steps
Limitations
- •Profit margin here is gross profit, not final net after taxes and overhead
- •Stock margin does not set maintenance levels for a real brokerage
- •Currency margin ignores spreads and swap fees
- •Industry benchmarks are ranges, not guarantees
- •No split of margin between gross and operating layers
Best Practices
- •Use revenue as the base for margin and cost as the base for markup
- •Compare the industry table for realistic targets
- •For price setting, always use the target-margin tab
- •In trading, keep cash above maintenance to avoid calls
- •Benchmark the exchange rate margin against published broker leverage
Common Misconceptions
Practical Tips
- •To price at a margin, divide by (1 − margin) — adding a percent to cost undercuts your margin
- •Markup is always larger than margin for the same trade; do not substitute one for the other
- •On a margin account, the margin call is triggered by equity percentage, not the price drop
- •The industry table is a sanity check: a 40% margin may be thin in software and generous in grocery
- •Include all variable costs in the cost input, or margin will look better than reality
- •Forex margin % is 1/leverage, so 1:100 is a 1% margin
Common Mistakes
Assumptions
This calculator makes the following assumptions to provide estimates:
Limitations
Be aware of these limitations when using this calculator:
Frequently Asked Questions
Answers to common questions about this calculator.
What is profit margin?
What is the difference between margin and markup?
What is margin trading?
What is a margin call?
What is currency exchange margin?
What is a good profit margin?
How do you calculate the break-even point?
What is the initial margin requirement?
What is maintenance margin?
How does leverage work in margin trading?
What is the difference between gross margin and net margin?
How do I calculate profit margin for a product?
What is operating margin?
How does margin differ across industries?
What is the formula for markup from margin?
What is a good net profit margin for a small business?
How do I improve my profit margin?
What is the difference between cash margin and futures margin?
What is cross-margining?
How does portfolio margining work?
What is a margin account vs a cash account?
What happens during a margin call?
How is margin interest calculated?
What is the pattern day trader rule?
How does margin work for short selling?
What is the difference between initial margin and maintenance margin?
What is leverage ratio in margin trading?
How does currency exchange margin differ from stock margin?
What is the margin requirement for forex trading?
What is a margin rate and how is it set?
How does dividend treatment work in margin accounts?
What is sector-specific margin requirement?
How do I calculate currency exchange leverage?
What is the relationship between margin and risk management?
How does inflation affect profit margins?
How do I calculate the selling price for a desired margin?
What is the difference between 50% margin and 50% markup?
How do SaaS companies typically calculate margins?
What is contribution margin and how is it used?
How do you calculate margin for a product line vs entire business?
What is the impact of discounts on profit margin?
Related Calculators
Explore more calculators related to this topic.
Related Guides
Deepen your understanding with these educational resources.
Glossary
Technical terms used in mortgage calculations explained in plain language.
- Profit Margin
- Profit divided by revenue, showing the share of each sales dollar kept as profit.
- Markup
- Profit divided by cost, showing the percentage added onto a cost-based price.
- Gross Margin
- Revenue minus cost of goods sold, before operating, interest, and tax costs.
- Net Margin
- Revenue minus all expenses, including operating, interest, and taxes.
- Margin Trading
- Buying securities with borrowed money, where the loan is secured by the purchased assets.
- Initial Margin
- The percentage of the trade the investor must supply upfront (often 50%).
- Maintenance Margin
- The minimum equity level that must be retained in a margin account (often 25%).
- Margin Call
- The broker demand to deposit more equity after prices fall, or the position is liquidated.
- Leverage
- The ratio of position size to margin, e.g., 20:1 means $20 of exposure for $1 of margin.
- Currency Margin
- The good-faith deposit required to hold a foreign exchange position.
- Break-Even Point
- The sales volume at which total revenue equals total cost, producing zero profit.
- Contribution Margin
- Price minus variable cost, showing profit available to cover fixed costs.
Authoritative References
Trusted sources and standards referenced by this calculator.
Applicable Standards
Was This Calculator Helpful?
Page Information
2026-08-07
2.0.0
Free to use for educational and professional purposes.