Money and finance

Profit margin calculator

Compare a product or service cost with its selling price. The result distinguishes profit margin from markup, two rates that are often confused.

Enter your values

Your results

Profit
—
Profit margin
—
Markup on cost
—

How we got this result: The page substitutes your current entries into this rule: Profit = price − cost; margin = profit ÷ price × 100; markup = profit ÷ cost × 100.

How to use this calculator

  1. Enter cost, selling price.
  2. Review the assumptions and units shown beside the fields.
  3. Read the live result, calculation note, and worked examples before using the answer.

Margin and markup divide the same profit differently

An item costs 60 and sells for 100, creating 40 of profit before any omitted expenses. Margin divides that 40 by the selling price and reports 40 percent. Markup divides the same 40 by cost and reports about 66.67 percent. Both statements are arithmetically true, but they answer different questions and should never share one unlabeled percentage field.

This calculator returns unit profit, margin, and markup from entered cost and price. It does not decide which expenses belong in cost or whether the result should be called gross, contribution, operating, or net profit. Define the cost scope first. A precise ratio based on incomplete costs can make an unprofitable product look attractive.

The denominators behind profit, margin, and markup

Profit = selling price - cost. Margin percentage = profit / selling price × 100. Markup percentage = profit / cost × 100. Margin looks at how much of each sales unit remains under the stated cost definition. Markup looks at how much profit was added relative to that cost base.

To convert a positive target margin m from percent to a price, express m as a decimal and solve price = cost / (1 - m). To price from a markup u, use price = cost × (1 + u). Entering 40 percent into those two formulas does not give the same price because their denominators differ.

CostPriceProfitMarginMarkup
601004040%66.67%
72901820%25%
125100-25-25%-20%
0PositiveEquals price100%No finite value
Positive0Negative costNo finite value-100%

Three products show why the denominator matters

With cost 60 and price 100, the tested margin function returns profit 40, margin 40 percent, and markup 66.666666667 percent. Calling the markup a 66.67 percent margin would materially overstate the share of revenue retained before other expenses.

With cost 72 and price 90, the function returns profit 18, margin 20 percent, and markup 25 percent. The gap between the ratios is smaller than in the first example but still meaningful. A business target written simply as 25 percent must say whether it refers to markup on cost or margin on sales.

With cost 125 and price 100, the output is profit -25, margin -25 percent, and markup -20 percent. The sale loses money under the entered cost. Negative ratios also differ because the denominators remain 100 and 125. A discount that creates this result may still have a strategic explanation, but the unit arithmetic should not be hidden.

Cost begins with a definition, not a receipt total

For a retailer, product acquisition, inbound freight, packaging, payment charges, marketplace commissions, fulfillment, returns, and spoilage may affect unit economics. For a service, labor time, subcontractors, software, travel, and rework may matter. Which items are variable, directly attributable, or allocated depends on the purpose of the analysis.

Write a cost map. Direct cost can support gross margin; variable cost can support contribution margin; fully allocated cost can support another management view. Do not blend definitions across products and then rank their percentages. Label the numerator and denominator so the same report can be reproduced next month.

Gross margin is not operating or net margin

Gross margin generally subtracts a defined cost of goods or services from revenue. Contribution margin subtracts variable costs to show what remains for fixed costs and profit. Operating and net margins incorporate broader expense layers. Exact accounting definitions and presentation requirements depend on the reporting framework and organization.

The two input fields cannot calculate those statements automatically. It computes a ratio from one chosen cost and one price. If using the result in management accounts, reconcile the cost field to the ledger definition. If using it for a quick product decision, state which costs are still outside the number.

Use realized revenue, not an imaginary list price

A list price may be reduced by promotions, coupons, rebates, returns, or channel commissions. Sales tax or VAT collected for an authority is often not business revenue, subject to the applicable accounting treatment. The relevant selling price for margin analysis should match the revenue definition used by the business, not whichever headline price looks best.

For a planned promotion, calculate scenarios at the expected realized price and volume. Include promotion-specific costs and expected returns when appropriate. A lower margin per unit can coexist with higher total contribution if volume changes, but that outcome is not guaranteed by the percentage. Keep unit economics and volume assumptions in separate columns.

Solve target margin from the selling-price side

Suppose cost is known and the goal is a target margin. Because margin uses selling price as its denominator, adding the target percentage to cost is wrong. A 40 percent margin requires price = cost / 0.60, not cost × 1.40. The latter calculation creates a 40 percent markup and a smaller margin.

After deriving a candidate price, test market constraints, tax presentation, channel fees, discounting, and price endings. Then run the chosen price back through the calculator to confirm its actual margin and markup. The formula can find a mathematical price, but customers and competitors do not guarantee that the market will accept it.

Zero denominators need words, not forced percentages

If selling price is zero, margin divides by zero and has no defined value. The unit profit is negative cost, but no revenue denominator exists. If cost is zero and price is positive, margin is 100 percent under the narrow entered scope, while markup has no finite value because it divides by zero. Displaying infinity or zero would conceal the missing denominator.

A zero entered cost can also mean missing data rather than a truly free input. Donations, digital goods, surplus inventory, and already-owned equipment still may have handling, labor, platform, or opportunity costs. Investigate why cost is zero before celebrating a 100 percent margin. Negative cost or price inputs require an unusual accounting context and careful labels.

Do not average product margins without revenue weights

A simple mean gives a small product and a major product equal influence. To calculate portfolio margin, add profit across the included sales and divide by total included revenue. Equivalently, weight each product margin by its revenue share. The combined ratio can move when sales mix changes even if every product's own price and cost stay fixed.

Track both percentage and absolute contribution. A high-margin niche may generate little total profit, while a lower-margin staple may contribute more because of volume. Inventory turns, capacity, customer acquisition, cash timing, and risk can matter alongside margin. The calculator provides one unit lens, not a complete product strategy.

Service margin must respect billable capacity

A freelancer may enter direct labor cost and client price, yet unbilled time for proposals, administration, training, and revisions still consumes capacity. If only billable hours carry those costs, the cost per billable hour should reflect realistic utilization rather than every paid hour being sold. Otherwise the apparent project margin can disappear at the business level.

Define the unit before calculating: an hour, project, appointment, subscription month, or deliverable. Estimate rework and support consistently. For fixed-price work, compare actual hours and external costs with the estimate after completion. For hourly work, separate the billing rate from the amount eventually collected after write-offs or payment fees.

Capacity limits also affect volume assumptions. A positive contribution per project does not prove that adding work is attractive if it requires overtime, delayed delivery, or lower quality. Model the incremental cost of the next unit and the longer-run cost of expanding capacity as separate scenarios.

Align currency and period before comparing margins

A sale in one currency and a cost in another cannot be subtracted until both are translated under an appropriate exchange-rate method. The timing of that translation can create gains or losses separate from product margin. Keep the original currencies and the rate source rather than replacing them with an unlabeled converted amount.

Period alignment matters for inventory as well. Purchase cost may come from a prior month, freight may arrive later, and rebates may be recognized under another process. Choose a consistent costing method and reconcile adjustments. Comparing a cash payment in one period with revenue recognized in another can produce a ratio that moves because of timing rather than economics.

For management scenarios, state whether the input is historical, standard, replacement, or forecast cost. Each can answer a useful question, but swapping among them without a label destroys comparability. The calculator will process any two numbers; the analyst must ensure they describe the same unit, currency basis, and decision horizon.

A monthly margin review that finds the cause

Compare planned price, realized price, planned cost, and actual cost rather than looking only at the final ratio. Separate price variance, discount variance, purchase-cost movement, freight, fees, returns, and mix. This decomposition points toward an action; a falling margin alone only identifies the symptom.

Keep source periods aligned. Do not divide this month's recognized profit by last month's revenue or mix tax-inclusive sales with tax-exclusive cost. Reconcile totals to the chosen accounting records and document any allocation. Where reporting decisions are material, involve a qualified accountant.

  • State the cost definition used for every ratio.
  • Keep margin and markup labels beside their percentages.
  • Use realized comparable revenue and cost periods.
  • Weight combined margin by revenue, not product count.
  • Investigate zero denominators and negative unit profit explicitly.

The unit-economics words that prevent mix-ups

Selling price is revenue per unit under the selected definition. Cost is the amount assigned to that unit for the analysis. Profit is price minus cost. Margin expresses profit as a percentage of price. Markup expresses profit as a percentage of cost. Both ratios use the same numerator but different denominators.

Gross margin, contribution margin, operating margin, and net margin subtract different expense layers. Realized price reflects actual discounts and adjustments. Sales mix is the proportion of revenue or volume from each item. Break-even occurs when relevant revenue and relevant cost are equal under a defined scope; a positive unit margin alone does not prove the whole business is profitable.

Reference and example table

CaseMeaning
Example 1Cost 60 and price 100 gives profit 40, margin 40%, and markup 66.67%.
Example 2Cost 100 and price 150 gives margin 33.33% and markup 50%.
Example 3Cost and price both 80 gives zero profit, margin, and markup.

Frequently asked questions

What is the difference between margin and markup?

Margin divides profit by selling price. Markup divides the same profit by cost. Because their denominators differ, their percentages usually differ too.

How do I calculate unit profit?

Subtract the defined unit cost from the comparable selling price. Make sure both amounts use the same currency, tax basis, and scope.

Why does adding 40 percent to cost not create a 40 percent margin?

Adding 40 percent of cost creates a 40 percent markup. A 40 percent margin uses selling price as the denominator and requires dividing cost by 0.60.

Which costs should I include?

That depends on whether you need gross, contribution, or another margin. Define direct, variable, and allocated costs consistently and state what remains excluded.

What does a negative margin mean?

The entered cost exceeds the selling price, so the unit loses money under that cost definition. Strategy may explain the sale, but the arithmetic remains negative.

Why has margin no defined value when price is zero?

Margin divides by selling price, and division by zero has no finite result. Report the unit loss and explain the zero-revenue context instead.

Can I average the margin percentages of several products?

Use revenue weighting. Add their profits and divide by combined revenue; a simple average is valid only under special equal-weight conditions.

Does a high margin prove a product is profitable overall?

No. Volume, fixed costs, acquisition expense, returns, capacity, inventory, and cash timing can change the overall outcome. Margin is one defined ratio.