2026-08-07 9 min

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.

Cost
$
Revenue
$
Margin (%)
%
Profit
$
Margin:37.50%
Profit:$30.00
Markup:60.00%
Cost / Revenue Ratio:62.5%
Cost
62.5%
Profit
37.5%

Margin vs Markup Comparison

ItemMargin ViewMarkup View
Cost$50.00$50.00
Revenue$80.00$80.00
Profit$30.00$30.00
Ratio37.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).

Results update live as you type

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.

IndustryGross MarginNet MarginNotes
Software / SaaS70% - 85%15% - 30%High margins, low COGS
Financial Services60% - 80%20% - 40%Regulatory costs vary
Healthcare50% - 70%10% - 20%High R&D and regulatory costs
Real Estate40% - 60%10% - 25%Leverage-dependent
Professional Services50% - 70%15% - 25%Labor-intensive
Retail (General)25% - 50%2% - 8%High volume, low margin
Grocery / Food Retail15% - 30%1% - 3%Razor-thin margins
Restaurants30% - 45%3% - 10%High fixed costs
Manufacturing20% - 40%5% - 15%Capital-intensive
Construction15% - 30%3% - 10%Project-dependent
Transportation / Logistics20% - 35%3% - 8%Fuel cost sensitive
Telecommunications50% - 65%10% - 20%High infrastructure costs
E-commerce30% - 50%3% - 15%Fulfillment cost heavy
Pharmaceuticals70% - 90%15% - 25%High R&D amortization
Oil & Gas40% - 60%5% - 15%Commodity price driven

Source: NYU Stern School of Business industry data, 2025. Margins approximate and will vary.

Results

Optimal

Profit Margin

37.50%

Profit as a percentage of revenue

Profit

$30.00

Revenue minus cost

Markup

60.00%

Profit as a percentage of cost

Cost / Revenue Ratio

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

Cost63%
Profit38%

Profit Margin

Margin38%

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.

Profit = Revenue - Cost; Margin = Profit / Revenue × 100%

Alternative Form

Markup = Profit / Cost × 100%; Selling Price = Cost / (1 - Target Margin)

Variables

SymbolNameUnitDescription
RevenueRevenueUSDMoney collected from sales
CostCostUSDThe expense of acquiring or producing the product
ProfitProfitUSDRevenue minus cost
MarginMargin%Profit divided by revenue
MarkupMarkup%Profit divided by cost
LLeverageratioMargin 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.

Step 1

Subtract the cost from the revenue to find the gross profit.

Profit = Revenue - Cost
Revenue:$80.00
Cost:$50.00
Intermediate: Profit = $80.00 - $50.00
Result: Gross profit = $30.00
Step 2

Divide the profit by revenue to express margin as a percentage of what was earned.

Margin = Profit / Revenue × 100%
Profit:$30.00
Revenue:$80.00
Intermediate: Margin = $30.00 / $80.00 × 100
Result: Profit margin = 37.50%
Step 3

Divide the profit by cost to find the markup percentage.

Markup = Profit / Cost × 100%
Profit:$30.00
Cost:$50.00
Intermediate: Markup = $30.00 / $50.00 × 100
Result: Markup = 60.00% of cost
Step 4

Compare your margin to industry benchmarks on the table below.

Your Margin vs Benchmark Range
Your Margin:37.50%
Common Range:5% - 25%
Intermediate: At or above the strong range
Result: Strong margin
Final Answer
37.50%

Worked Examples

See how the calculator works with different scenarios.

Scenario

A product costs $50 and sells for $80.

Inputs

Cost:$50
Revenue:$80

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

▸Pricing products at a margin target
▸Comparing profitability against the industry table
▸Budgeting the cash required for a margin purchase
▸Sizing forex positions for a fixed risk amount
▸Converting markup to margin and back for quotes
▸Setting a needed selling price for a product line overhaul

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

Myth: A 50% markup is a 50% margin.
Truth: Markup divides profit by cost and margin divides by revenue: a 50% markup on a $10 cost is a 33.3% margin on the $15 price.
Myth: In a margin trade the broker covers losses.
Truth: Your equity absorbs losses first; the broker may issue a margin call and can liquidate positions at the maintenance level.
Myth: High leverage only multiplies gains.
Truth: Leverage multiplies losses too: 20:1 exposure makes a 5% adverse move a 100% loss of your deposited margin.
Myth: Margin and profit percentage are interchangeable in pricing.
Truth: Pricing built on profit divided by cost (markup) silently overstates profitability versus margin on revenue.

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

Adding a percent to cost and calling it a margin
Cost + 40% produces only a 28.6% margin. Use Selling Price = Cost / (1 − Margin).
Swapping margin and markup when talking to suppliers
Margin divides by revenue; markup divides by cost. Your 37.5% margin is a 60% markup.
Assuming stock margin is the whole loan
Margin is the cash percentage required; the broker lends the difference and charges interest on it.
Opening FX positions at maximal leverage
Each base is fixed: 20:1 on a $1,000 account is $20,000 of exposure and a 5% move has doubled to $1,000 reversals.
Forgetting maintenance after buying
A qualifying 50% initial rule can fall to the 25% maintenance margin mid-trade; size the account for the dip.

Assumptions

This calculator makes the following assumptions to provide estimates:

Gross profit basis: All profit figures here are gross margin revenue minus direct cost, not a fully loaded net profit.
Reg T for equities: Margin percentages reflect typical broker requirements (model including the Reg T 50% start).
Simple currency margin: FX margin ignores rollover, spreads, and broker-specific margin at weekend positions.
Single product: Each calculation is one product or one undefined; mix effects are not averaged.
No discounts: Selling price is the list price before promotions or volume discounts, which reduce effective margin.

Limitations

Be aware of these limitations when using this calculator:

Gross vs net: All results are gross of taxes, overhead, interest, and depreciation.
Maintenance gaps: The stock tab sizes the initial purchase only; maintenance and margin calls are not model edges.
Leverage limits: Forex regulation (e.g., SEC requirements) varies by domicile; ratios shown may not be available in every jurisdiction.
Penalties ignored: Broker interest, fees, and daily swaps are not subtracted from the profit figures.
Static prices: There is no price-markup interaction over volume; quantities are not modeled.

Frequently Asked Questions

Answers to common questions about this calculator.

What is profit margin?
Profit margin is the amount by which revenue from sales exceeds costs in a business, usually expressed as a percentage. It can also be calculated as net income divided by revenue or net profit divided by sales. For instance, a 30% profit margin means there is $30 of net income for every $100 of revenue.
What is the difference between margin and markup?
Margin is the percentage of profit relative to revenue (selling price), while markup is the percentage of profit relative to cost. For example, if a product costs $50 and sells for $80, the margin is (80-50)/80 = 37.5%, but the markup is (80-50)/50 = 60%. Markup is always higher than margin for the same transaction.
What is margin trading?
Margin trading is the practice of using borrowed funds from brokers to trade financial assets. Buying stocks using borrowed money is known as "trading on margin." Margin trading tends to amplify gains and/or losses. Federal regulations only allow investing borrowers to borrow up to 50% of the total cost of any purchase as the initial margin requirement.
What is a margin call?
If the market moves against a trader, resulting in losses such that there is an insufficient amount of margin, an automatic margin call will apply. Unless the account holder deposits funds to bring the account back up to the minimum maintenance required, the broker closes all positions to prevent a negative balance.
What is currency exchange margin?
In the context of currency exchange, margin can be thought of as a good faith deposit required to maintain open positions, similar to a security deposit. A 2% margin requirement is equivalent to 50:1 leverage, allowing an investor to trade with $10,000 in the market by setting aside only $200.
What is a good profit margin?
A good profit margin varies by industry. Generally, a 10% net profit margin is considered average, 20% is good, and 30%+ is excellent. However, some industries like grocery retail operate on razor-thin margins of 1-3%, while software companies often achieve 70-80% margins.
How do you calculate the break-even point?
The break-even point is when total revenue equals total costs, resulting in zero profit. It can be calculated as: Break-Even Point = Fixed Costs / (Selling Price per Unit - Variable Cost per Unit). Use the Break-Even Calculator for detailed analysis.
What is the initial margin requirement?
The initial margin requirement is the minimum amount of equity an investor must provide when purchasing securities on margin. Under Federal Reserve Regulation T, the initial margin requirement is 50% of the total purchase price, though brokerages may require more.
What is maintenance margin?
Maintenance margin is the minimum amount of equity that must be maintained in a margin account. The Financial Industry Regulatory Authority (FINRA) requires a minimum maintenance margin of 25%, but many brokerage firms set higher requirements, typically 30-40%.
How does leverage work in margin trading?
Leverage allows traders to control a larger position with a smaller amount of capital. For example, with 50% initial margin (2:1 leverage), an investor can buy $10,000 worth of stock with only $5,000 of their own money. Leverage amplifies both gains and losses proportionally.
What is the difference between gross margin and net margin?
Gross margin measures profitability after deducting only the cost of goods sold (COGS), while net margin accounts for all expenses including operating costs, interest, and taxes. Gross margin is useful for evaluating production efficiency, while net margin reflects overall business profitability.
How do I calculate profit margin for a product?
Profit margin = ((Revenue - Cost) / Revenue) × 100. For example, if a product costs $50 to produce and sells for $100, the margin is 50%. You can use this calculator by entering any two values (cost, revenue, margin, or profit) to calculate the remaining figures.
What is operating margin?
Operating margin measures the proportion of revenue left after paying variable costs of production like wages and raw materials, but before paying interest and taxes. It is calculated as Operating Income / Revenue and is a key indicator of management efficiency and pricing strategy.
How does margin differ across industries?
Profit margins vary significantly by industry. Software companies often have gross margins of 70-80%, while grocery retailers operate on 1-3% margins. High-volume, low-margin businesses rely on scale, while low-volume, high-margin businesses depend on premium pricing.
What is the formula for markup from margin?
Markup = Margin / (1 - Margin). For example, a 37.5% margin equals a 60% markup. Conversely, Margin = Markup / (1 + Markup). Understanding both metrics helps with pricing strategy and financial analysis across different business contexts.
What is a good net profit margin for a small business?
A good net profit margin for small businesses typically ranges from 7% to 10%, though this varies by industry. Service-based businesses often achieve 15-20% margins, while retail and food businesses may see 2-6%. Consistently monitoring margins helps identify cost issues early.
How do I improve my profit margin?
Profit margins can be improved by reducing costs (negotiating with suppliers, improving efficiency), increasing prices (if demand allows), optimizing product mix (focusing on higher-margin items), and reducing waste. Even a 1% margin improvement can significantly impact bottom line.
What is the difference between cash margin and futures margin?
Cash margin refers to using borrowed money from a broker to purchase securities. Futures margin is the good-faith deposit required to hold a futures position. Futures margin amounts are typically much lower (5-15% of contract value) compared to stock margin (50% initial).
What is cross-margining?
Cross-margining is a risk management technique where a broker offsets related positions across different accounts or products to reduce overall margin requirements. For example, offsetting long and short positions in correlated instruments can lower the total capital required.
How does portfolio margining work?
Portfolio margining calculates margin requirements based on the overall risk of a portfolio rather than individual positions. This approach often results in lower margin requirements for diversified portfolios because it accounts for hedging and offsetting positions.
What is a margin account vs a cash account?
A margin account allows you to borrow money from your broker to purchase securities, using your existing securities as collateral. A cash account requires you to pay the full purchase price. Margin accounts offer leverage but carry the risk of margin calls and interest charges.
What happens during a margin call?
When the equity in your margin account falls below the maintenance requirement, your broker issues a margin call requiring you to deposit additional funds or securities. If you fail to meet the call, the broker can liquidate positions without your consent to restore the account.
How is margin interest calculated?
Margin interest is calculated daily based on the outstanding debit balance and the broker's margin interest rate. The formula is: Interest = Daily Balance × (Annual Rate / 360). Rates vary by broker and account size, typically ranging from 6% to 12% APR.
What is the pattern day trader rule?
FINRA's pattern day trader rule requires traders who execute four or more day trades within five business days in a margin account to maintain a minimum equity of $25,000. Accounts below this threshold are restricted from day trading until the minimum is met.
How does margin work for short selling?
Short selling requires a margin account because you are borrowing shares to sell. The initial margin for short sales is typically 150% of the trade value (100% proceeds + 50% requirement). Maintenance margin for short positions is usually 25-30% of the current market value.
What is the difference between initial margin and maintenance margin?
Initial margin is the minimum equity required to open a position, typically 50% for stocks under Regulation T. Maintenance margin is the minimum equity that must be maintained after the position is opened, typically 25-30%. Falling below maintenance triggers a margin call.
What is leverage ratio in margin trading?
The leverage ratio represents how much buying power you have relative to your capital. A 2:1 leverage ratio means you control $2 for every $1 of your own money. Higher leverage amplifies both gains and losses. Maximum leverage for stocks is typically 2:1 (50% initial margin).
How does currency exchange margin differ from stock margin?
Currency exchange margin typically involves much higher leverage (up to 50:1 or even 100:1 for major pairs) compared to stock margin (2:1 maximum). Forex margin requirements are set by brokers based on market volatility and regulatory limits, not a fixed federal requirement.
What is the margin requirement for forex trading?
Forex margin requirements vary by currency pair and broker. Major pairs like EUR/USD typically require 2-5% margin (20:1 to 50:1 leverage). Exotic pairs may require 5-10%. The calculator above lets you determine the required margin based on your chosen ratio and trade size.
What is a margin rate and how is it set?
A margin rate (or call rate) is the interest rate brokers charge on margin loans. It is typically based on the broker call rate plus a spread. Rates are variable and can change with market conditions. Larger account balances often qualify for lower margin rates.
How does dividend treatment work in margin accounts?
When you buy stock on margin, any dividends paid are credited to your account but may be subject to higher margin requirements. In a short sale, you are responsible for paying equivalent dividends to the stock lender, which are treated as interest expense.
What is sector-specific margin requirement?
Brokers may impose higher margin requirements on volatile sectors like biotechnology, cryptocurrency-related stocks, or small-cap companies. These "sector haircuts" can raise initial margin from 50% to 70-100%, effectively eliminating leverage for high-risk positions.
How do I calculate currency exchange leverage?
Leverage = Total Trade Value / Margin Required. For example, with a 2% margin requirement (50:1 leverage), you can control $50,000 worth of currency with only $1,000 margin. Higher leverage increases potential returns but also magnifies potential losses proportionally.
What is the relationship between margin and risk management?
Margin amplifies both gains and losses, making risk management essential. Traders should use stop-loss orders, diversify positions, and avoid over-leveraging. A common rule is to never risk more than 1-2% of account equity on a single trade, regardless of margin availability.
How does inflation affect profit margins?
Inflation can squeeze profit margins when input costs rise faster than selling prices. Companies with strong pricing power can pass costs to customers, protecting margins. Businesses with fixed-price contracts or commodity-sensitive inputs may see margin compression during high inflation.
How do I calculate the selling price for a desired margin?
To achieve a target margin, use the formula: Selling Price = Cost / (1 - Desired Margin). For example, if a product costs $50 and you want a 40% margin, the selling price would be $50 / (1 - 0.40) = $83.33. Use the Goal Margin Calculator tab above to quickly compute this.
What is the difference between 50% margin and 50% markup?
A 50% margin means profit is 50% of the selling price (profit/selling price = 50%). A 50% markup means profit is 50% of the cost (profit/cost = 50%). For a product costing $50, a 50% margin gives a $100 selling price with $50 profit. A 50% markup gives a $75 selling price with $25 profit. Margin percentages are always lower than markup percentages for the same transaction.
How do SaaS companies typically calculate margins?
SaaS companies focus on gross margin (revenue minus cost of goods sold, typically hosting and support costs) and net dollar retention (recurring revenue from existing customers). SaaS gross margins are typically 70-85%, much higher than traditional businesses. Customer acquisition cost (CAC) payback period is another key SaaS metric related to margin analysis.
What is contribution margin and how is it used?
Contribution margin is the selling price minus variable costs. It measures how much each unit sold contributes to fixed costs and profit. The formula is: Contribution Margin = Revenue - Variable Costs. A high contribution margin means more revenue is available to cover fixed costs. It is critical for break-even analysis and pricing decisions.
How do you calculate margin for a product line vs entire business?
Product line margin considers only the costs and revenue for that specific product. Overall business margin includes all products and overhead costs. Product line margins help identify which products are most profitable, while overall business margin reflects total business health. Use the profit margin calculator for each product line separately for detailed analysis.
What is the impact of discounts on profit margin?
Discounts directly reduce profit margins. A 10% discount on a product with a 30% margin reduces the margin to about 22%. The higher the discount, the more sales volume needed to maintain total profit. For example, a 20% discount requires approximately 33% more sales volume to achieve the same total profit.

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

Federal Reserve Regulation TFINRA Margin Rules (Rule 4210)SEC Rule 15c3-1 (net capital)

Was This Calculator Helpful?

Page Information

Last Updated:

2026-08-07

Version:

2.0.0

License:

Free to use for educational and professional purposes.