Calculations & UnitsLast updated: 2026-09-11

Margin Calculator

Calculate profit, margin and markup from cost and selling price, or work backwards from a target margin to a price. Made for online shop sellers.

Open My tools

Profit

-

Margin

-

Markup

-

A gross estimate excluding sales tax, shipping and payment fees. Consider those costs when setting actual prices.

ShareXfB!L

How to use

  1. 1

    Enter cost and price

    Fill in the cost and selling price to see profit, margin and markup instantly.

  2. 2

    Work backwards

    Enter the cost and a target margin to solve for the selling price.

  3. 3

    Apply to pricing

    Use the results as a baseline when planning discounts and fees.

Features

  • Instant profit, margin and markup from cost and selling price
  • Solve the selling price from a target margin
  • Losses (negative margins) displayed as-is
  • Everything computed in your browser; nothing is transmitted

Use cases

Pricing an online shop

Solve the selling price from wholesale cost and your target margin.

Marketplace profit checks

Confirm the real margin after fees using true cost and sale price.

Planning discounts

Recompute the margin at discounted prices to find your floor.

Details

Margin is profit as a percentage of the selling price: margin = (price − cost) ÷ price × 100. At a cost of 700 and a price of 1,000, the profit is 300 and the margin is 30%. A related figure is markup (profit ÷ cost × 100), which here is about 42.9%. The two use different bases, so keep them consistent when comparing.

To set a price from a target margin, work backwards: price = cost ÷ (1 − target margin). To secure a 30% margin on a 700 cost, aim for 700 ÷ 0.7 = 1,000. On marketplaces, include selling fees and shipping in the cost to price on the real margin.

The calculation is a gross estimate that excludes sales tax, payment fees and advertising. A negative margin simply means the sale is loss-making and shows how large the loss is. Actual pricing should also reflect market prices, competitors and inventory risk.

FAQ

What is the difference between margin and markup?

Margin is profit divided by the selling price; markup is profit divided by the cost. At a cost of 700 and a price of 1,000, the margin is 30% and the markup about 42.9%.

What does a negative margin mean?

It means the selling price is below the cost — a loss. The negative percentage shows how large the loss is per sale.

Does it include sales tax or shipping?

No. Enter cost and price figures that already include those to compute the effective margin.

Are the amounts I enter sent anywhere?

No. All computation happens locally in your browser and nothing you enter is transmitted.

All processing happens in your browser. Your files are never uploaded.

Verified: Margin, markup, reverse pricing, loss cases and error states are covered by browser tests

Did you know?

On a 700 cost sold at 1,000, the 300 profit is a 30% margin but a 42.9% markup — the same profit reads differently depending on the base, so keep metrics consistent when comparing.

Optional usage measurement settings

Only with your consent, a random browser ID and tool/learning events are sent to measure return visits. This is pseudonymous measurement. Inputs, answers, keys, files and search terms are excluded. Consent expires after 90 days. Declining does not limit any feature.

Measurement is off.

Retention and privacy