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 quantity | Example result |
|---|---|
| Profit margin | 33.3333 % |
| Profit / loss on entered costs | $40.00 |
| Markup on cost | 50 % |
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.
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.
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.
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
- SEC: understanding revenues, costs and gross profit
- SEC: Understanding Margin Accounts
- CFTC: over-the-counter forex and leverage
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.