Financial calculators

Profit and margin calculator

Calculate profit or loss after entered costs, compare gross margin and markup, and find a target selling price.

Calculated on your device

Use the direct cost for the same quantity or period as your revenue.

Selling price or comparable total revenue, including zero; use matching tax treatment.

Currency sets the money unit. It does not convert exchange rates.

Target selling price

Your chosen target, below 100%; this is a margin on revenue, not a markup on cost.

Include other expenses

Optional: overhead, fees or other expenses for the same item or period. Enter 0 to exclude. Do not repeat amounts already in direct cost. Gross margin and target price still use direct cost only.

Profit or loss after all entered costs
—
Total entered costs
—
Gross profit or loss on entered direct costs
—
Gross margin
—
Markup on cost
—
Price for your entered target gross margin
—

Calculate to see your result.

Use matching quantities, periods and tax treatment for cost and revenue. Currency formats only; defaults are illustrative.

Compare profit, margin and markup

  1. Enter direct cost and selling price for the same item, or comparable total COGS and revenue for the same period.
  2. Choose gross margin or markup, then enter its percentage to calculate a target price.
  3. Calculate, review the separate ratios and download the result.

Formulas and example

Gross profit = revenue − direct cost. Gross margin = profit ÷ revenue × 100%. Markup = profit ÷ cost × 100%. Price for target margin m = cost ÷ (1 − m ÷ 100). Price for target markup u = cost × (1 + u ÷ 100).

Cost 100 and price 150 gives profit 50, gross margin about 33.33% and markup 50%. A 20% target margin needs price 125, rather than 120. At price 80 and cost 100, loss is 20, margin −25% and markup −20%.

Xero’s margin and markup explanation distinguishes revenue and cost denominators. This calculator uses gross amounts relative to entered direct costs; the optional other-expenses field subtracts only expenses you supply. It is not a complete financial statement.

Assumptions and limits

No automatic tax, currency conversion, overhead, discounts, transaction fees or shipping-cost treatment. Include relevant additional expenses yourself without double-counting direct cost. Enter comparable amounts and relevant direct costs yourself. The target is chosen by you and does not recommend a market price. Gross margin does not determine whether your entire business is profitable.

Cost 0–1 trillion units, with positive cost and revenue at least 1e-12; revenue and other expenses 0–1 trillion; target margin 0–99.99% or markup 0–1,000,000%. A zero cost and positive revenue gives 100% gross margin, but markup is undefined and no positive price can produce a target below 100%; those margin-target outputs are labeled undefined. A percentage markup on zero cost gives a zero target price, not a positive profit. Zero revenue is supported, with undefined gross margin. Losses are supported.

Privacy and rounding

Inputs stay in browser memory without uploads or saved financial values. CSV includes cost, revenue, target, gross profit, ratios, other expenses and profit after entered expenses; undefined zero-cost or zero-revenue values use empty numeric fields with a note. Tiny nonzero monetary values use scientific notation on screen and in CSV instead of rounding to zero. Other exported results normally use six decimals. Currency rounding can affect a target price. The target-price action uses the full calculated amount as revenue; review currency rounding before using a selling price. It is unavailable when the target is undefined or exceeds the supported revenue limit. Estimates are not accounting or pricing advice. Reset restores illustrative defaults. Undo last action restores your raw inputs, currency search, disclosure states and accepted result after Reset, removing expenses or applying the target price. Editing a value discards that recovery step.

Is 50% markup the same as 50% margin?

No. At cost 100, 50% markup gives price 150 and margin 33.33%. A 50% margin requires price 200.

Does this include operating expenses?

Open “Include other expenses” to enter their total. Profit after entered costs = revenue − direct cost − other expenses. Gross margin, markup and target price continue to use direct cost only. Nothing is inferred automatically.

Related tools

Percentage calculator · Financial tools