Profit Margin Calculator

Calculate profit, profit margin, markup and pricing relationships from cost and selling price. You can also solve for a selling price from a target profit margin.

$
$
$
×

Your Profit Margin Results

Total Unit Cost $0.00
Profit per Unit $0.00
Profit Margin 0.00%
Markup 0.00%
Selling Price $0.00
Profit margin compares profit with selling revenue, while markup compares profit with cost. They are related but not interchangeable.

Profit Calculation Breakdown

Base Cost$0.00
Additional Variable Costs$0.00
Total Unit Cost$0.00
Selling Price$0.00
Profit per Unit$0.00
Total Profit for Quantity$0.00
Profit Margin0.00%
Markup0.00%

Transparent formulas

Profit = selling price − total cost. Profit margin = profit ÷ selling price × 100. Markup = profit ÷ total cost × 100. To solve from a target margin: selling price = total cost ÷ (1 − target margin).

Free Profit Margin Calculator for Pricing and Business Decisions

The SonoCalculator Profit Margin Calculator helps you calculate profit per unit, profit margin, markup and selling price from simple business inputs. It is designed for ecommerce sellers, retailers, wholesalers, freelancers, manufacturers, service businesses and anyone who needs a clear way to understand pricing profitability.

Profit margin and markup are among the most commonly confused business percentages. Both describe the relationship between cost, selling price and profit, but they use different denominators. Understanding the difference matters because a 50% markup does not produce a 50% profit margin.

How to Use the Profit Margin Calculator

Calculate margin from cost and selling price

  1. Choose Calculate margin from cost & selling price.
  2. Enter your base cost.
  3. Enter any additional variable costs that belong to the unit or sale.
  4. Enter the selling price.
  5. Optionally enter a quantity to estimate total profit across multiple units.
  6. Select Calculate Profit Margin.

Find a selling price from a target margin

  1. Choose Find selling price from target margin.
  2. Enter total cost inputs.
  3. Enter your desired profit margin percentage.
  4. The calculator solves the selling price required to produce that margin.

From cost to margin

Profit Margin Formula

Profit margin measures how much of each unit of revenue remains as profit after the costs included in the calculation.

Profit = Selling Price − Total Cost Profit Margin = Profit ÷ Selling Price × 100%

If a product costs $40 in total and sells for $65, profit is $25. The margin is 25 ÷ 65 × 100 ≈ 38.46%.

Profit Margin vs Markup

Markup uses cost as the denominator rather than selling price.

Markup = Profit ÷ Total Cost × 100%

Using the same $40 cost and $65 selling price, markup is 25 ÷ 40 × 100 = 62.5%. So the same sale has a 38.46% margin and a 62.5% markup.

Total CostSelling PriceProfitMarginMarkup
40501020%25%
40602033.33%50%
40804050%100%
401006060%150%
Key difference: Margin asks what percentage of selling revenue is profit. Markup asks how much profit was added relative to cost.

How to Calculate Selling Price From a Target Profit Margin

If you know the profit margin you want, rearrange the margin formula:

Selling Price = Total Cost ÷ (1 − Target Margin)

Write the target margin as a decimal. A 40% target margin becomes 0.40.

Example: 40% target margin

If total unit cost is $30 and you want a 40% profit margin:

$30 ÷ (1 − 0.40) = $30 ÷ 0.60 = $50

You would need a selling price of $50 before considering costs that were not included in the $30 cost input.

Profit Margin Examples

Ecommerce product example

A seller buys or makes a product for $18, spends another $4 on packaging and fulfilment-related variable costs, and sells the product for $35. Total cost is $22. Profit is $13. Margin is 13 ÷ 35 × 100 ≈ 37.14%, while markup is 13 ÷ 22 × 100 ≈ 59.09%.

Retail example

A retailer buys an item for €25 and sells it for €40 with no additional entered cost. Profit is €15. Profit margin is 37.5%, while markup is 60%.

Service example

A service costs £120 in direct labour and other variable resources to deliver and is billed at £200. Profit before overhead not included in the cost input is £80. Margin is 40%, and markup is 66.67%.

Product pricing

Use full variable unit cost rather than purchase price alone when you want a more realistic product margin.

Service pricing

Include direct labour or subcontractor cost when it belongs directly to delivering the service.

Volume planning

Use quantity to estimate total profit if per-unit economics stay the same.

What Costs Should You Include?

The answer depends on what kind of margin you are trying to calculate. For a product-level contribution margin, you may include costs that change with each sale: purchase cost, raw materials, packaging, fulfilment, transaction fees or sales commissions.

For a broader business margin, fixed overhead such as rent, salaries, software, insurance, equipment, advertising and administration may also matter. A single-order calculator cannot automatically know how those costs should be allocated, so SonoCalculator leaves the cost model under your control.

Common variable costs

Examples include inventory cost, raw materials, packaging, shipping subsidies, payment fees, marketplace commissions, contractor cost, per-sale software charges and direct labour.

Common fixed costs

Examples include rent, base salaries, subscriptions, insurance, equipment leases and office expenses. Fixed costs may be allocated across products if you are calculating a more complete profitability measure.

Gross Margin vs Net Profit Margin

Gross margin typically compares gross profit with revenue after cost of goods sold. Net profit margin compares final net profit with revenue after broader operating expenses, interest, taxes and other costs.

This calculator does not force one accounting definition. It calculates margin from the costs you enter. If you enter only direct product cost, the result resembles a product or gross-style margin. If you include a broader allocation of business expenses, the result becomes closer to an operating or net-style profitability estimate.

Use consistent definitions: When comparing margins over time or across products, include costs on the same basis. Otherwise the percentages may not be comparable.

Contribution Margin

Contribution margin is another useful concept. It generally measures revenue remaining after variable costs. That remaining amount can contribute toward fixed costs and then profit.

Contribution = Revenue − Variable Costs Contribution Margin = Contribution ÷ Revenue × 100%

If the “Cost” and “Additional Variable Costs” fields contain all relevant variable costs, the margin produced by this calculator can also function as a simple contribution-margin estimate.

What Does a Negative Profit Margin Mean?

A negative margin means the selling price is below the costs included in the calculation. For example, if total cost is $50 and the item sells for $45, profit is −$5 and margin is approximately −11.11%.

Negative margins may be intentional in limited situations—such as promotions, customer acquisition or clearance—but they are not sustainable indefinitely unless other revenue offsets the loss.

Can Profit Margin Be Over 100%?

For the standard formula using positive revenue and nonnegative cost, profit margin cannot exceed 100% because profit cannot be greater than revenue when costs are nonnegative. A 100% margin would require zero cost.

Markup, however, can easily exceed 100%. If a product costs $20 and sells for $60, profit is $40, giving a 200% markup but a 66.67% margin.

What Is a Good Profit Margin?

There is no universal “good” margin. Appropriate margins vary by industry, product type, business model, competition, inventory risk, customer acquisition cost, sales volume and overhead.

A grocery business may operate on very different margins from software, luxury goods, consulting or handmade ecommerce. Instead of relying on a single generic benchmark, compare your margin with your own costs, cash-flow needs, market conditions and relevant industry economics.

How Profit Margin Helps With Pricing

Margin is useful because it tells you how much room exists between cost and selling price. That room may need to absorb overhead, returns, discounts, advertising, taxes, future cost increases and business profit.

A price that looks profitable before marketplace fees or fulfilment costs can become unattractive after those costs are included. For ecommerce sellers, it is usually better to test several price scenarios with realistic total costs.

How Discounts Affect Profit Margin

A discount reduces selling price but often leaves many costs unchanged. Because profit is the difference between selling price and cost, margin can shrink faster than the headline discount suggests.

Suppose cost is $40 and regular price is $80. Margin is 50%. A 25% discount reduces the selling price to $60. Profit becomes $20 and margin falls to 33.33%. The price dropped by 25%, but profit per unit dropped by 50%.

How Fees Affect Margin

Marketplace, payment-processing and sales commissions are costs. If they are directly tied to a sale, include them in total variable cost when you want the calculator to reflect post-fee profitability.

For example, an ecommerce product with $25 product cost and $5 of platform/payment/fulfilment costs has a total unit cost of $30—not $25. Calculating margin from the lower cost would overstate profitability.

Profit Margin for Multiple Units

If the per-unit price and cost stay constant, total profit equals profit per unit multiplied by quantity. The percentage margin remains the same because both total profit and total revenue scale proportionally.

Total Profit = Profit per Unit × Quantity

In real businesses, volume can change costs through bulk discounts, shipping tiers, labour efficiency or platform pricing. Use updated per-unit inputs when economics change at higher volume.

Common Profit Margin Mistakes

Confusing margin with markup

A 50% markup is not a 50% margin. With a cost of $100, a 50% markup gives a $150 selling price and a 33.33% margin.

Leaving out important variable costs

Packaging, payment fees, shipping subsidies or commissions can materially reduce the true margin.

Using revenue instead of profit in the numerator

Margin uses profit divided by revenue, not revenue divided by cost.

Using the wrong formula for target pricing

To get a 40% margin, do not simply add 40% to cost. Adding 40% to cost is a 40% markup, which produces a lower margin.

Comparing margins calculated from different cost definitions

A margin based only on product cost cannot be fairly compared with another margin that includes shipping and fees unless you understand the difference.

Ignoring taxes and accounting rules

This calculator is a pricing and planning tool, not a substitute for formal financial statements or tax accounting.

How Accurate Is This Profit Margin Calculator?

The arithmetic is exact for the numbers you enter. Real-world usefulness depends on whether your cost inputs reflect the expenses relevant to the decision you are making.

For pricing, contribution analysis and quick profitability checks, the transparent formulas are usually more useful than a calculator that hides assumptions. For formal accounting, use your financial records and applicable accounting policies.

Frequently Asked Questions

How do I calculate profit margin?

Subtract total cost from selling price to find profit, then divide profit by selling price and multiply by 100.

What is the difference between margin and markup?

Margin divides profit by selling price, while markup divides profit by cost.

How do I calculate selling price from a target margin?

Divide total cost by one minus the target margin expressed as a decimal. For a 40% margin, selling price = cost ÷ 0.60.

Can profit margin be negative?

Yes. A negative margin means the selling price is below the costs included in the calculation.

Can profit margin exceed 100%?

Not under the standard formula when revenue is positive and costs are nonnegative. Markup can exceed 100%, but margin normally cannot.

What costs should I include?

Include the costs relevant to the margin you want to measure. For product-level profitability, this often includes product cost and other variable costs tied to the sale.

Does quantity change profit margin?

If price and per-unit cost stay constant, quantity changes total profit but not the percentage margin.

Is a 50% markup the same as a 50% margin?

No. A 50% markup on $100 cost gives a $150 price, $50 profit and a 33.33% margin.

Can I use this for services?

Yes. Enter the direct or allocated cost of delivering the service and the selling price charged to the customer.

Can I use this for ecommerce products?

Yes. Include product cost plus relevant variable costs such as packaging, fulfilment, marketplace fees or payment fees when you want a more realistic margin.

Method note: This calculator uses standard business arithmetic for profit, margin and markup. It does not impose one accounting framework or industry benchmark; the result reflects the costs you choose to include.