Margin Calculator

Profit margin

33.3333 %

Profit / loss on entered costs

$40.00

All results
Calculator inputs
?

Profit margin and brokerage collateral are different meanings of margin. Select the intended calculation.

?

Margin divides profit by revenue; markup divides profit by cost. Revenue excludes any tax not retained by the business.

?

Revenue from the modeled unit or period. Keep cost on the same basis; no sales tax is added.

?

Entered cost for the same unit or period as revenue. Whether this is cost of goods or all expenses determines what the resulting profit means.

Revenue, cost and profit are different quantities

Profit equals revenue minus the entered cost. Negative profit is drawn as a loss.

Revenue$120.00
Cost$80.00
Profit / loss$40.00

How nonnegative revenue is allocated

Shown only for a nonnegative-profit scenario; losses are not represented as a positive pie slice.

How nonnegative revenue is allocatedEntered cost: $80.00 (66.7%)Profit: $40.00 (33.3%)Total$120
  • Entered cost$80.0066.7%
  • Profit$40.0033.3%

Profit, margin and markup reconciliation

Margin uses revenue as denominator; markup uses cost. The entered cost basis determines whether this is gross or another profit measure.

Profit, margin and markup reconciliation
QuantityAmount
Revenue$120.00
Cost on the same basis$80.00
Profit / loss$40.00

Same cost, different margin targets

Illustrative targets on the current cost, without tax or overhead added. At zero cost, the zero prices do not identify those margin ratios; use a positive cost for this comparison.

Same cost, different margin targets
Target marginRequired revenueProfitEquivalent markup
0 %$80.00$0.000 %
10 %$88.89$8.8911.1111 %
20 %$100.00$20.0025 %
25 %$106.67$26.6733.3333 %
30 %$114.29$34.2942.8571 %
40 %$133.33$53.3366.6667 %
50 %$160.00$80.00100 %
60 %$200.00$120.00150 %
75 %$320.00$240.00300 %
90 %$800.00$720.00900 %

How to use the Margin Calculator

Solve profit margin, markup and selling price, or calculate stock/forex margin from explicit requirements. Compare the denominators and funding amounts visually.

  1. 1. Enter your inputs

    Start with Margin context, Known business quantities, Selling price / revenue, Cost. Use the units shown beside each field and open the field help when you need its assumptions.

  2. 2. Read the results

    Results update as you enter valid values. Review Profit margin, Profit / loss on entered costs, Markup on cost. Keep the entered units and settings consistent when comparing scenarios.

  3. 3. Check the calculation

    No live prices, financing interest, short selling, portfolio offsets, regulatory minimum lookup, exchange-rate risk forecast or automatic liquidation threshold.

    See the worked example and method

Understanding the Margin Calculator: uses, inputs and results

The Margin Calculator prevents gross margin and markup from being confused, since they use different bases for the same profit.

Do I mean profit margin, markup or trading collateral?

The Margin Calculator keeps these meanings distinct. Business ratios compare profit with revenue or cost, while stock and currency modes estimate funding from an explicitly entered requirement.

Changing the denominator changes the answer

The same $40 profit is 33.33% of $120 revenue and 50% of $80 cost. A price target must therefore specify margin or markup.

A deposit is different from exposure

Trading funding arithmetic does not establish broker approval, maintenance requirements or a safe position size. Entered leverage leaves the position’s economic exposure larger than its deposit.

Further reading: SEC: understanding revenues, costs and gross profit · SEC: Understanding Margin Accounts

What do the Margin Calculator inputs mean?

Margin context
Profit margin and brokerage collateral are different meanings of margin. Select the intended calculation.
Known business quantities
Margin divides profit by revenue; markup divides profit by cost. Revenue excludes any tax not retained by the business. This field applies when Margin context is set to Business profit and pricing.
Selling price / revenue
Revenue from the modeled unit or period. Keep cost on the same basis; no sales tax is added. Unit: $. This field applies when Known business quantities is set to Selling price and cost or Selling price and profit margin or Selling price and profit amount.
Cost
Entered cost for the same unit or period as revenue. Whether this is cost of goods or all expenses determines what the resulting profit means. Unit: $. This field applies when Known business quantities is set to Selling price and cost or Cost and target profit margin or Cost and target markup or Cost and profit amount.
Target profit margin
Profit as a percentage of revenue. Negative values represent losses; above 100% would imply negative costs. Unit: %. This field applies when Known business quantities is set to Cost and target profit margin or Selling price and profit margin or Profit amount and profit margin.
Target markup
Profit as a percentage of cost. A 50% markup gives a 33.333…% margin. Unit: %. This field applies when Known business quantities is set to Cost and target markup.
Known profit / loss
Revenue minus entered cost; negative values represent a loss. Unit: $. This field applies when Known business quantities is set to Cost and profit amount or Selling price and profit amount or Profit amount and profit margin.
Price per share
Entered purchase price; not a live quote. Unit: $. This field applies when Margin context is set to Stock purchase funding.
Number of shares
Whole shares in the purchase. Fractional shares and options are outside this simple funding calculation. This field applies when Margin context is set to Stock purchase funding.
Entered initial equity requirement
Your explicit percentage of purchase value funded with equity. This example is not an assertion of a legal or broker minimum. Unit: %. This field applies when Margin context is set to Stock purchase funding.
Home currency per position unit
Currency conversion quote for one unit of the position, expressed in your account/home currency. It is not fetched live. Unit: $. This field applies when Margin context is set to Currency-position funding.
Position units
Number of position currency units, not automatically standard lots. This field applies when Margin context is set to Currency-position funding.
Notional-to-deposit ratio
Entered leverage ratio: 20 means notional value is 20 times the modeled deposit. It does not establish legal availability or liquidation policy. Unit: :1. This field applies when Margin context is set to Currency-position funding.

When is the Margin Calculator useful?

Check a selling price

Enter price and cost to see gross profit, margin on sales and markup on cost together.

Explore pricing changes

Change the selling price while holding cost fixed. These gross figures do not include overhead or establish net business profit.

Margin Calculator: a practical reference

The fixed “Margin versus markup” example on this page produces the results below. It illustrates the stated model; your live results above use your current inputs.

Margin context
Business profit and pricing
Known business quantities
Selling price and cost
Selling price / revenue
120 $
Profit margin
33.3333 %
Profit / loss on entered costs
$40.00
Review the example inputs and calculation

Use the result in context

No live prices, financing interest, short selling, portfolio offsets, regulatory minimum lookup, exchange-rate risk forecast or automatic liquidation threshold.

Try the Margin Calculator·Read the subject guide·Explore a related calculator

Worked example: Margin Calculator

Margin versus markup. This fixed reference example shows one complete scenario; the interactive results above use your current inputs.

View the example inputs
Margin context
Business profit and pricing
Known business quantities
Selling price and cost
Selling price / revenue
120 $
Cost
80 $
Calculated results for the fixed example
Calculated quantityExample result
Profit margin33.3333 %
Profit / loss on entered costs$40.00
Markup on cost50 %

Margin Calculator: separate profit ratios from trading deposits

How do I calculate profit margin?

Subtract cost from revenue, then divide that profit by revenue. With $120 selling revenue and $80 cost, profit is $40 and profit margin is one third, or about 33.33%. The denominator matters: the ratio describes the share of revenue left after the entered cost.

Cost must refer to the same unit, order or reporting period as revenue. If you enter only cost of goods, the result is a gross-profit measure and does not deduct every operating expense. A complete company net margin requires a complete, consistently defined cost and income basis.

SEC: understanding revenues, costs and gross profit

What is the difference between margin and markup?

Markup divides profit by cost. In the $120/$80 example, the same $40 is a 50% markup, even though the margin is 33.33%. Using a margin target as if it were a markup produces a different selling price.

At an $80 cost, a 20% markup gives $96 revenue and a 16.67% margin. A 20% margin requires $100 revenue and a 25% markup. The target table makes this denominator difference visible across several illustrative margins.

What selling price gives my target profit margin?

Divide cost by one minus the desired margin as a fraction. An $80 cost at a 20% target margin gives $80 / 0.80 = $100. Alternatively, known revenue and margin identify cost; known profit and either revenue or cost identify the remaining amount.

The solver does not infer that the market will accept the calculated price. A target margin of 100% cannot yield finite revenue from positive cost through that division. At zero revenue, the margin ratio is undefined; at zero cost, markup is undefined. Those are denominator conditions, not zero-profit conclusions.

Can profit margin and markup be negative?

Yes. Selling at $80 against a $100 cost loses $20. That is a −25% margin relative to revenue and a −20% markup relative to cost. The loss chart retains its negative sign rather than drawing it as a positive slice.

A negative result can help inspect a proposed discount or a change in costs, but it does not identify the cause. It also does not include volume changes: selling more units at a lower price can affect an entire business differently from a single-unit calculation.

What does margin mean when buying stocks?

For a stock purchase, margin refers to funding and account equity rather than business profit. Purchase value equals price per share times shares; the modeled equity contribution is that value times your entered initial requirement. The remaining purchase value is funded by borrowing in this simplified calculation.

An $18.30 share price, 100 shares and an illustrative 30% requirement give $1,830 purchase value and $549 equity. That entered percentage is not a statement of a regulatory minimum or broker approval. Maintenance requirements, financing interest, other positions and forced sales need additional information.

SEC: Understanding Margin Accounts

How is a forex margin deposit calculated?

Convert the position units into home-currency notional value, then divide by the entered notional-to-deposit ratio. At 100 units, 1.30 home-currency units per position unit and a 20:1 ratio, notional is 130 and modeled deposit is 6.50 in the home currency.

A smaller deposit does not reduce the economic exposure to the size of that deposit. Forex notional less deposit is not treated as an ordinary cash loan here. The calculator does not establish available leverage, legal limits, spread, liquidation prices or negative-balance protections; the CFTC resource explains the distinct leverage context.

CFTC: over-the-counter forex and leverage

Formula and calculation method

Business: profit = revenue − cost; margin = profit/revenue × 100; markup = profit/cost × 100. A zero denominator is reported explicitly.

Cost and target margin: price = cost/(1 − margin/100). Cost and markup: price = cost × (1 + markup/100).

Stock funding = entered share price × shares × entered equity requirement/100. Borrowed amount = purchase value − equity.

Forex notional = units × home-currency quote; modeled deposit = notional / entered leverage. These are funding arithmetic, not a maintenance-margin, margin-call or broker-approval model.

Scope and Limitations

  • No live prices, financing interest, short selling, portfolio offsets, regulatory minimum lookup, exchange-rate risk forecast or automatic liquidation threshold.

Reference Sources

Frequently asked questions

Is a 50% markup the same as a 50% margin?

No. With $80 cost and $120 revenue, profit is $40, markup is 50% and margin is about 33.33%.

What price gives a 20% margin on $80 cost?

$80 / (1 − 0.20) = $100 revenue, giving $20 profit.

Does the result always represent net business profit?

No. It subtracts only the costs you enter. A gross-cost input does not automatically include operating expenses, financing or taxes.

Does the stock funding percentage determine my broker requirement?

No. It is an explicit scenario input. The calculator does not determine eligibility, maintenance requirements or legal minima.

Is leveraged forex notional the same as the margin deposit?

No. Notional describes the converted position exposure; the deposit is that amount divided by the entered leverage ratio.