Finance · FREE ONLINE TOOL

Margin Calculator

Calculate profit margin and markup, solve a target selling price, or explore simplified stock and currency margin requirements.

Currency: USD
USD

Enter all amounts in USD. Changing currency keeps numbers unchanged; no exchange rate is applied.

What would you like to calculate?

Your inputs

How it works

Calculate

Margin = profit/selling price. Markup = profit/cost.

Enter amounts in the same currency. Tax and commission rules can vary by contract and jurisdiction.

Calculations run in your browser. No account needed.

EXAMPLE RESULTCalculated locally
Profit
$20.00
Profit margin
20%
Markup
25%
Clear inputs. Transparent methods.
My workspace

Calculate with your inputs to save a result or compare scenarios.

How it works

Illustration for Margin Calculator: a divided rectangle; coins and a calculator.
CalculateMargin = profit/selling price. Markup = profit/cost.
A useful distinction

A target margin is not guaranteed profit

At cost 60 and selling price 100, product margin is 40%. If 10 in shipping and fees was omitted from cost, the all-in margin is only 30%; decide which costs your comparison includes before solving price.

Include fulfillment before reading the margin

Selling price
$70
Profit margin. A ($42) → 40%. B ($49) → 30%.
Include fulfillment before reading the margin
Total costCalculationProfit margin
A $42(70 − 42) ÷ 70 × 10040%
B $49(70 − 49) ÷ 70 × 10030%

Profit margin and markup use different denominators

Profit is selling price minus cost. Margin divides that profit by selling price; markup divides it by cost. Use the basic or known-pair method to recover missing amounts, or use target margin to find the price needed for a chosen margin. Include the same cost categories consistently when comparing products.

Worked example: a 60 cost and a 100 selling price

A product costing 60 and selling for 100 produces 40 of profit before any costs you have omitted. Margin is 40/100 = 40%, while markup is 40/60 = 66.67%. A 40% markup on 60 would instead produce a price of 84 and a margin of only 28.57%.

Margin and markup are not interchangeable
MeasureCalculationResult
Profit100 − 6040
Margin40 ÷ 10040%
Markup40 ÷ 6066.67%
Price for a 40% target margin60 ÷ (1 − 0.40)100

Use a complete cost figure for the decision

Product cost alone may describe gross product margin but omit payment fees, shipping, returns or overhead. The calculator reports the relationship between the entered cost and revenue; it does not decide which accounting costs belong in your analysis. For marketplace sales, the seller-profit calculator separates several of those charges.

Trading margin is a separate calculation

The stock and foreign-exchange methods estimate financing or collateral requirements from the entered purchase, leverage and maintenance assumptions. They do not calculate a product’s profit margin or determine a broker’s actual requirements. Choose the method by the meaning of margin in your question.

Distinguishing profit margin from markup

An item that costs 80 and sells for 100 earns 20 before other costs. Its margin is 20 ÷ 100 = 20%, while its markup is 20 ÷ 80 = 25%. To achieve a 30% margin on a cost of 80, divide 80 by 0.70 to get approximately 114.29; adding 30% to cost would give only 104. Include the costs you intend the margin to cover. Stock and foreign-exchange margin modes calculate collateral requirements, a different use of the word margin.

Calculate: formula and assumptions

Margin = profit/selling price. Markup = profit/cost.

Enter amounts in the same currency. Tax and commission rules can vary by contract and jurisdiction.

Use Calculate

Cost or price from margin: formula and assumptions

Price=cost/(1−margin); cost=price×(1−margin).

Margin is profit divided by selling price; it differs from markup.

Use Cost or price from margin

Stock margin account: formula and assumptions

Borrowing=purchase value×(1−initial margin); call price=borrowing/[shares×(1−maintenance margin)].

A simplified long-stock model without interest, dividends, or broker-specific requirements.

Use Stock margin account

Foreign-exchange margin: formula and assumptions

Required margin=position units×quote price×account conversion/leverage.

Exchange rates are supplied by you. Broker and instrument rules may differ.

Use Foreign-exchange margin

Profit amount & margin comparison: formula and assumptions

Profit = revenue − cost; margin = profit/revenue; markup = profit/cost.

Margin is undefined at zero revenue, and markup is undefined at zero cost. Inverse profit/margin needs a positive margin.

Use Profit amount & margin comparison

Worked example

Reference example currency: USD. These fixed examples do not change with your calculator preferences.

Using the Calculate example:

Inputs
Cost ($)
80
Selling price ($)
100
Method

Margin = profit/selling price. Markup = profit/cost.

Result

Example result

Profit: $20.00

Profit margin: 20%

Markup: 25%

These are illustrative inputs. Change the values to explore a different scenario.

Formula references

References explain the underlying methods; they do not imply endorsement or individual professional review of Finflo.

Common questions

Why are margin and markup different percentages?

Margin divides profit by revenue; markup divides profit by cost. The profit-and-margin inverse requires positive profit and positive margin in this model.

Do the stock and FX modes apply my broker’s exact requirements?

No. They use entered ratios, leverage and exchange rates. Broker rules, financing charges and instrument requirements can differ.

How do I price for a target margin?

For cost C and target margin m as a decimal, price = C/(1 − m). A target below 100% is required for a finite positive price.

Does the profit result include overhead and taxes?

Only if the costs you enter include the relevant amounts. The basic calculation does not add them automatically.

Is stock margin the same as sales profit margin?

No. Stock margin concerns borrowed funds and account equity; sales margin measures profit relative to selling price.

See our methodology and editorial policy. Read the relevant professional-advice limitations.