---
title: "Margin Calculator"
type: "page"
canonical_url: "https://simcalculo.com/en/margin-calculator/"
markdown_url: "https://simcalculo.com/en/margin-calculator.md"
date_published: "2026-10-19T17:18:18-03:00"
date_modified: "2026-10-19T17:18:18-03:00"
author: ""
language: "en-US"
category: ""
summary: "How to calculate profit margin Subtract cost from selling price to get profit. Divide profit by selling price, then multiply by 100. Margin (%) = (selling price − cost) ÷ selling price × 100. For an item that costs USD 60 and sells for USD…"
---

# Margin Calculator

Calculate profit margin and markup from cost and selling price, or find a selling price for your target margin.

What would you like to calculate?Margin from cost and selling priceSelling price from target marginSelling price from markup

Cost per item

USD

Include the costs you want to account for. Use the same tax basis as the selling price.

Selling price per item

USD

Target profit margin (%)Percentage of the selling price, from 0 to 99.99%.

Markup on cost (%)Percentage added to the cost, not the selling price.

CurrencyUSDGBPEURCADAUDBRLDisplay only; no currency conversion.

QuantityWhole items. Unit percentages stay the same.

Use decimal points, such as 60.50. Margin and markup use different denominators. Taxes, fees and overhead are not added automatically.

CalculateUse exampleClear

PROFIT MARGIN

##

Profit per item

Markup on cost

Selling price per item

### Totals for your quantity

Revenue

Entered costs

Profit on entered costs

Show the calculation

This is profit on the costs you entered, not necessarily your business's net profit. Values are rounded for display; the calculations use full precision.

Copy resultDownload CSVPrint result

## How to calculate profit margin

Subtract cost from selling price to get profit. Divide profit by selling price, then multiply by 100.

**Margin (%) = (selling price − cost) ÷ selling price × 100.**

For an item that costs USD 60 and sells for USD 100, profit is USD 40 and the margin is 40%. The quantity affects total revenue and profit, but not the unit percentages.

## Margin versus markup

Margin uses selling price as its denominator. Markup uses cost. In the same example, USD 40 profit divided by USD 60 cost gives a markup of approximately 66.67%.

A 40% markup on USD 60 gives a price of USD 84, not USD 100. Profit is USD 24 and the margin is approximately 28.57%. The percentages measure different things.

## Find a selling price for a target margin

**Selling price = cost ÷ (1 − target margin ÷ 100).** For a USD 60 cost and 40% target margin, divide 60 by 0.60 to get USD 100. A target of 100% is not possible with a positive cost and a finite selling price.

The calculation uses full precision. If the result includes a fraction of a cent, the displayed price rounds to the nearest cent. Round up when a minimum target must be met.

## What to include in cost

Enter the cost basis you want to evaluate. For a product-level gross margin, that commonly means cost of goods sold. If you include extra expenses, the result instead reflects profit after those entered expenses. Do not assume it represents your whole business’s net margin.

Use cost and price on a consistent tax basis. Taxes, marketplace fees, payment fees, shipping and overhead are not automatically added. Percentage fees based on the selling price require separate treatment; this calculator does not infer them.

## Losses and zero cost

A selling price below cost produces negative profit and margin. The tool flags that loss. A positive selling price with zero cost has a 100% margin, while markup is undefined because it would divide by zero. Price-building modes require positive cost.

## Formula reference and privacy

[Shopify’s profit-margin reference](https://www.shopify.com/tools/profit-margin-calculator) uses selling price as the margin denominator and distinguishes it from markup on cost. This tool uses those basic arithmetic definitions and does not depend on a paid service or current tax tables.

Calculations run in your browser. The calculator does not submit the cost and price values you enter to our server. Currency selection only changes the display label.
