RAPIDCALC • FINANCE TOOLS

Profit Margin Calculator

Calculate gross profit, margin and markup from selling price and cost.

Calculator inputs

Calculation results

Gross profit margin

40%
Gross profit$400.00
Total revenue$1,000.00
Markup on cost (%)66.67%

Gross margin is based on selling price; markup is based on cost. Excludes operating expenses and taxes.

CALCULATOR GUIDE

Understand Profit Margin Calculator

Explore the formula, worked examples and practical explanations behind this calculator.

What is a profit margin calculator?

A profit margin calculator helps sellers understand how much gross profit remains after the direct cost of an item. It is useful for retail stores, e-commerce, wholesale pricing, product businesses and freelance work when you can identify a direct unit cost. The key distinction is between margin, measured against sales revenue, and markup, measured against cost.

This calculator uses a per-unit cost, selling price and quantity sold. It reports gross margin percentage, gross profit, total revenue and markup percentage. It does not calculate company-wide net income.

How to calculate profit margin

  1. Enter your cost per item. Include direct product costs relevant to the comparison.
  2. Enter your selling price per item before any unmodeled fees or taxes.
  3. Enter the number of units sold.
  4. Read the gross profit margin as a percentage of sales.
  5. Use the result breakdown to compare gross profit, revenue and markup on cost.

Prices and cost should use the same currency. Changing the currency symbol does not perform a foreign-exchange conversion, so enter prices already expressed in your chosen currency.

Gross margin formula

Gross profit per unit = selling price − cost per item

Gross margin (%) = (selling price − cost) ÷ selling price × 100

Total revenue = selling price × quantity

Total gross profit = (selling price − cost) × quantity

Gross margin tells you what percentage of each sale remains after the cost used in this calculator. It is a gross measure, not a final take-home profit or an after-tax amount.

Worked example: $60 cost and $100 selling price

A product costs $60 and sells for $100. You sell 10 units.

  • Gross profit per unit = $100 − $60 = $40.
  • Gross margin = $40 ÷ $100 × 100 = 40%.
  • Markup = $40 ÷ $60 × 100 = 66.67%.
  • Revenue = $100 × 10 = $1,000.
  • Total gross profit = $40 × 10 = $400.

A 40% margin and a 66.67% markup describe the same prices; they are not interchangeable percentages.

Margin versus markup: the difference

Margin uses selling price as the denominator, while markup uses product cost. This means a 50% markup does not produce a 50% profit margin. If an item costs $80 and you mark it up by 50%, you sell it for $120. Profit is $40, so the margin is $40 ÷ $120 = 33.33%.

Cost Selling price Gross margin Markup
$50 $75 33.33% 50.00%
$60 $100 40.00% 66.67%
$80 $100 20.00% 25.00%
$100 $100 0.00% 0.00%

Before setting prices, decide whether your business’s pricing policy specifies a target margin or a target markup. Mixing these terms can underprice products.

What selling price gives a target margin?

If you know the direct cost and want a particular gross margin, rearrange the margin equation:

Required selling price = cost ÷ (1 − target margin as a decimal)

For a cost of $60 and a target gross margin of 40%, the required price is $60 ÷ 0.60 = $100. This is a useful reverse calculation, although the current calculator’s input fields accept selling price rather than a target margin directly.

A target margin is not a guarantee of profitability: overhead costs, advertising and operating expenses still have to be paid.

What costs should you include?

At minimum, use the direct cost of the goods or services you are measuring. For an online seller, product acquisition cost might be only part of the picture: shipping, marketplace commissions, payment processing, packaging and returns could reduce the amount you keep. Whether particular costs belong in cost of goods sold depends on accounting practice, so be consistent and document your basis.

For example, if an item sells for $100, costs $60 to purchase and has an additional $8 in per-sale fees, the $40 gross profit shown by this calculator falls to $32 after that extra fee. Its simple 40% margin is not the same as the margin after every variable expense.

Can margins be negative or undefined?

A negative margin occurs when unit cost exceeds selling price. Selling an item for $80 that costs $100 produces a −25% margin. If the selling price is zero, gross margin cannot be meaningfully calculated because its denominator is zero. Likewise, markup is undefined when item cost is zero. These edge cases should not be interpreted as ordinary positive percentages.

Does quantity change the margin percentage?

When selling price and per-unit cost remain fixed, quantity changes total revenue and total gross profit but not gross margin percentage. Selling 100 units rather than 10 at $100 each and $60 cost raises gross profit from $400 to $4,000, while margin remains 40%.

Real businesses may have bulk discounts, tiered fees and changing unit economics. For those cases, calculate each pricing tier separately instead of assuming constant cost.

Gross margin is not net profit margin

Net profit accounts for operating expenses and other costs beyond those entered here. A company may have healthy product-level gross margins but still lose money after rent, payroll, fulfillment, marketing, taxes or interest. Use this tool to evaluate item-level pricing, then prepare a fuller profit-and-loss analysis for business decisions.

The results are mathematical estimates based on supplied inputs. They do not verify the accuracy of your accounting classifications.

Step-by-step learning guide

For a deeper explanation with examples, read the RapidCalc learning guide.

COMMON QUESTIONS

Frequently Asked Questions

Clear answers to help you understand your results.

01Are gross margin and markup the same?
No. Margin divides profit by selling price; markup divides profit by cost.
02Can margin be negative?
Yes, when selling price is below unit cost.
03Does it include tax?
Only if you included it in the amounts entered.
04How is gross profit calculated?
Selling price minus cost, multiplied by quantity.
05What if selling price is zero?
The margin percentage is undefined.
06What if product cost is zero?
Markup percentage is undefined.
07Does quantity affect the margin percentage?
No, not when unit prices and costs stay constant.
08Is this net profit margin?
No, it is gross margin based on the direct cost you enter.