Use the calculators below to find, starting from the cost price, the profit margin, the markup or the ideal selling price of your product.

Find your margin and markup

Enter the cost price and selling price to calculate the profit, margin and markup.

Profit
Margin
Markup

Find your selling price

Enter the cost price and desired profit margin to calculate the selling price.

Selling price
Profit
Equivalent markup

What is Profit Margin?

Profit margin is the percentage of the selling price that represents the profit earned on each transaction. It's one of the most important financial indicators for any business, because it directly measures the profitability of each product or service sold.

The profit margin formula is:

Margin (%) = [(Selling Price − Cost) ÷ Selling Price] × 100

Practical example: a product with a cost of $60.00 sold for $100.00 generates $40.00 in profit and a margin of 40% — because $40 represents 40% of the $100 selling price.

Why is profit margin so important?

Without knowing your margin, you could be selling a lot and still losing money. This happens when fixed and variable costs eat up all the apparent profit. Tracking your margin lets you:

Tip: There are three types of profit margin you should know: gross margin (deducting only the product's cost), operating margin (also deducting operating expenses) and net margin (deducting everything, including taxes). For pricing, use gross margin as your starting point.

How to Calculate Profit Margin: Step by Step

Calculating profit margin is simple once you have a clear picture of all the costs involved. Follow these steps:

  1. Add up the total cost of the product
    Include the purchase or production price, inbound freight, packaging and any other expense directly tied to the product.
  2. Set the selling price
    The price the customer pays. On marketplaces, use the final price before the platform's commission.
  3. Calculate gross profit
    Profit = Selling Price − Total Cost
  4. Calculate the margin
    Margin = Profit ÷ Selling Price × 100

Worked example

A shop owner buys bags for $85.00 (including shipping) and sells them for $149.90.

  • Profit = $149.90 − $85.00 = $64.90
  • Margin = $64.90 ÷ $149.90 × 100 = 43.3%

This means that for every $100 collected from the sale, $43.30 is gross profit — before paying rent, salaries and taxes.

How to calculate selling price from a desired margin

If you know the cost and want to guarantee a specific margin, the formula is:

Selling Price = Cost ÷ (1 − Desired Margin)

Example: cost of $85.00, desired margin of 40%.
Selling Price = 85 ÷ (1 − 0.40) = 85 ÷ 0.60 = $141.67

Profit Margin vs. Markup: Understand the Difference

Profit margin calculates the profit percentage based on the selling price. Markup calculates the profit percentage based on cost. Both start from the same absolute profit, but use different bases — which is why a 40% markup never equals a 40% margin.

Margin

Margin = Profit ÷ Selling Price

Markup

Markup = Profit ÷ Cost Price

Selling Price

SP = Cost ÷ (1 − Margin)
Classic mistake: A business owner applies a 40% markup thinking they'll get a 40% margin. If the cost is $100 and they add 40%, the selling price is $140. The real margin is 40 ÷ 140 = 28.57%, not 40%. That difference can mean a loss at the end of the month.

How to convert markup into margin (and vice versa)

Markup → Margin

Margin = Markup ÷ (1 + Markup)

Margin → Markup

Markup = Margin ÷ (1 − Margin)

Comparison Table: Margin × Markup

See the equivalence between profit margin and markup for the most commonly used percentages in commerce:

Profit MarginEquivalent Markup

Margin will always be lower than the equivalent markup — because it's calculated over a larger value (the selling price).

How to Calculate Markup

Markup is widely used in retail and manufacturing to set prices quickly. There are two ways to calculate it:

1. From cost and selling price

Markup (%) = [(Selling Price − Cost) ÷ Cost] × 100

Example: a product bought for $50 and sold for $80.
Markup = (80 − 50) ÷ 50 × 100 = 30 ÷ 50 × 100 = 60%
(The profit margin in this case would be 30 ÷ 80 = 37.5%)

2. From the desired profit margin

Markup = Margin ÷ (1 − Margin)

Example: desired margin of 35%.
Markup = 0.35 ÷ (1 − 0.35) = 0.35 ÷ 0.65 = 0.5385 = 53.85%

When should you use markup? Markup is practical when you need to apply a fixed factor across an entire product line. For example, when setting the entire perfume line at a 100% markup (which equals a 50% margin). But always double-check the equivalent margin to make sure fixed costs will be covered.

How to Set the Right Selling Price

Selling price shouldn't be set based only on competitors or intuition. A badly calculated price can generate a loss even with high sales volume. Follow this method:

  1. Add up all direct costs
    Purchase price + inbound freight + packaging + labels + other costs tied to the product.
  2. Add up the variable expenses of the sale
    Marketplace commission (e.g., 13% on eBay), card processing fee (e.g., 2.8%), subsidized outbound shipping, sales taxes (VAT, sales tax, etc.).
  3. Calculate the allocation of fixed costs
    Divide your monthly fixed costs (rent, salaries, electricity, internet) by the number of products sold in the month. Add that value to the unit cost.
  4. Set your desired net profit margin
    Based on your profitability target, apply the formula: SP = Total Cost ÷ (1 − Margin).
  5. Check against the competition
    Compare the calculated price with competitors. If it's much higher, review your costs or assess whether the product justifies the price through perceived value.

Example: setting a selling price for e-commerce

ItemValue
Product cost$45.00
Packaging + tape$3.50
Inbound freight$2.00
Fixed cost allocation$8.00
Total unit cost$58.50

With a desired margin of 35%:
Selling Price = $58.50 ÷ (1 − 0.35) = $58.50 ÷ 0.65 = $90.00

By selling for $90.00, the store secures $31.50 in profit per unit, with an effective margin of 35%.

Main Mistakes in Pricing

Knowing the most common mistakes is just as important as mastering the formulas. Here are the ones that hurt profitability the most:

1. Confusing margin with markup

The most frequent mistake. Applying a 30% markup thinking you'll get a 30% margin actually produces a real margin of only 23.1%. At scale, that difference can mean a monthly loss.

2. Ignoring fixed costs in the price

Rent, salaries, electricity and internet exist even when there are no sales. If those costs aren't allocated into product prices, your gross margin turns into a net loss.

3. Not including marketplace fees

Commissions on eBay, Etsy and Amazon add up to between 12% and 16% of the selling price. Ignoring them is one of the most common reasons for selling a lot while earning very little.

4. Pricing based only on the competition

Copying a competitor's price without knowing your own costs is dangerous. They may have purchasing terms, scale or an operating structure completely different from yours.

5. Not reviewing prices periodically

Costs change: suppliers raise prices, shipping costs rise, taxes change. A price that was profitable in January can generate a loss by July without the business owner noticing.

6. Ignoring the impact of discounts on margin

A 10% discount on the selling price can reduce the margin by far more than 10%. On a product with a 30% margin, a 10% discount cuts profit by 33%. Always use the calculator before offering discounts.

Profit Margin Examples by Industry

Each sector has very different cost and margin dynamics. Here are practical examples for the main retail and service industries:

Supermarkets and Grocery Stores

In food retail, gross margins vary widely by category. Produce and dairy run between 20% and 35%, while beverages and personal care products can reach 40% to 50%.

Example: Rice bought for $2.10/lb, sold for $3.20/lb.
Profit = $1.10 | Margin = 34.4%

A supermarket's net margin, after all expenses, usually falls between 1% and 4%, which requires high sales volume to be viable.

Restaurants and Food Service

The industry uses the concept of food cost: ingredient cost should represent between 25% and 35% of a dish's price. A dish with a $12 food cost should be sold between $34 and $48.

Example: A dish whose ingredients cost $14.00, sold for $42.00.
Food cost = 33.3% | Gross margin = 66.7%

After labor, rent and utilities, a restaurant's typical net margin lands between 5% and 15%.

Pharmacy

Generic drugs have margins tightly regulated by drug pricing authorities, around 20% to 28%. Perfumes, supplements and cosmetics allow margins of 40% to 60%.

Example: Supplement bought for $18.00, sold for $32.99.
Profit = $14.99 | Margin = 45.4%

Insurance agreements and loyalty programs affect margin and should be factored into pricing.

Clothing and Fashion Store

In apparel, gross margins of 50% to 70% are common — especially for private-label brands or women's fashion. High seasonal turnover requires wider margins to cover unsold stock.

Example: Dress bought for $22.00, sold for $59.90.
Profit = $37.90 | Margin = 63.3%

Stores with high inventory turnover should factor in the cost of tied-up capital when setting prices.

General E-commerce

In e-commerce, besides the product cost, the calculation includes: packaging (~$1 to $3), outbound shipping ($3 to $12), platform fees (~3%), payment gateway (~2.8%) and return rate (~2% to 5%).

Example: Product at $18, packaging $1.50, shipping $5. Total: $24.50.
Suggested price for a 35% margin: $37.69

A gross margin of at least 40% is recommended so that net margin in e-commerce stays positive after all fees.

Distributor and Wholesale

Distributors work with lower margins and higher volume. Gross margins between 8% and 20% are typical, but high turnover offsets the tight margin.

Example: A case of product bought for $170.00, sold for $204.00.
Profit = $34.00 | Margin = 16.7%

The payment terms extended to retailers (30/60/90 days) create a financing cost that should be built into the price.

eBay

eBay's final value fee ranges from 11% to 16% per sale, depending on the category. There's also payment processing on top, and shipping costs if you offer free shipping.

Example: Product with a $40.00 cost, 13% fee on a $89.90 sale.
Fee = $11.69 | Total cost = $51.69 | Real margin = 42.5%

Always price on eBay including the selling fee as a variable cost in your margin calculation.

Etsy

Etsy charges listing, transaction and payment processing fees that typically total 12% to 14% of the order value. Free shipping is often absorbed by the seller, and sale campaigns can reduce your margin further.

Example: Product with a $10.00 cost, sold for $21.90. Fees at 13% = $2.85.
Total cost = $12.85 | Margin = 41.3%

Only join promotional campaigns when your original margin is already high enough to absorb the reduction without a loss.

Amazon

Amazon charges between 8% and 15% in referral fees, plus a closing fee for certain categories. If you use FBA (Fulfillment by Amazon), add storage and fulfillment costs (~$3 to $8 per unit).

Example: Product with a $60.00 cost, sold for $130.00. 12% fee = $15.60. FBA = $6.00.
Total cost = $81.60 | Margin = 37.2%

On Amazon, winning the Buy Box requires competitive pricing — carefully calculate your total cost with FBA before setting a price.

Frequently Asked Questions About Profit Margin

Direct answers to the most common questions about margin, markup and pricing:

What is profit margin?
Profit margin is the percentage of the selling price that represents the profit earned on a sale. If a product costs $60 and sells for $100, the profit is $40 and the margin is 40% (40 ÷ 100). It's different from markup, which calculates profit based on cost.
What's the difference between profit margin and markup?
Margin uses the selling price as its base (Profit ÷ Selling Price), while markup uses cost as its base (Profit ÷ Cost). A 40% markup equals a margin of only 28.57%, because the calculation bases are different. Confusing the two is one of the most common pricing mistakes.
How do you calculate profit margin?
Formula: Margin (%) = [(Selling Price − Cost) ÷ Selling Price] × 100. Example: cost $50, selling price $80. Profit = $30. Margin = (30 ÷ 80) × 100 = 37.5%.
What is markup?
Markup is the percentage applied to the cost price to arrive at the selling price. Formula: Markup (%) = [(Selling Price − Cost) ÷ Cost] × 100. A product that costs $50 and sells for $80 has a 60% markup.
How do you calculate the markup of a product?
Markup (%) = [(Selling Price − Cost) ÷ Cost] × 100. Or, from the desired margin: Markup = Margin ÷ (1 − Margin). Example with a 30% margin: Markup = 0.30 ÷ 0.70 = 42.86%.
What's the formula for selling price based on margin?
Selling Price = Cost ÷ (1 − Margin). Example: cost $60, desired margin 40%. Selling Price = 60 ÷ (1 − 0.40) = 60 ÷ 0.60 = $100.00.
What is considered a good profit margin?
It depends on the industry. In food retail, margins between 20% and 40% are common. In restaurants, between 30% and 60% (gross). In e-commerce, between 35% and 50%. Pharmacies typically run between 20% and 35%. What matters most is that the margin covers all fixed and variable costs while still generating positive net profit.
What is gross profit?
Gross profit is the difference between the selling price and the direct cost of the product (COGS — Cost of Goods Sold). It doesn't deduct operating expenses like rent, salaries or taxes on revenue.
What is net profit?
Net profit is what's left after deducting all costs and expenses: COGS, fixed expenses (rent, salaries), variable expenses (commissions, shipping, marketplace fees) and taxes. It's the most complete indicator of a business's real profitability.
What's the difference between cost and expense?
Cost is spending directly related to producing or purchasing the product (raw materials, packaging, inbound freight). Expense is spending required to run the business, but not directly tied to the product (rent, electricity, administrative salaries). Both must be considered when setting your price.
How do I use the Margin Calculator?
The calculator has two modes. In the first, you enter the cost price and selling price to find the profit, margin and markup. In the second, you enter the cost price and your desired margin to automatically calculate the ideal selling price. Results appear instantly as you type.
What is contribution margin?
Contribution margin is what's left of the selling price after deducting variable costs and expenses. It shows how much each product contributes toward covering fixed costs and generating profit. Formula: CM = Selling Price − Variable Costs.
How do you calculate the break-even point?
Break-even point (BEP) = Total Fixed Costs ÷ Unit Contribution Margin. With $5,000 in fixed costs and a contribution margin of $25 per product, the BEP is 200 units/month — below that, the business runs at a loss.
What is the ideal profit margin for e-commerce?
In e-commerce, the margin needs to absorb shipping, packaging, platform fees (~3% to 5%), payment gateway (~2.8%) and returns. A minimum gross margin of 35% to 45% is recommended so the net margin stays positive after all expenses.
How do you price products on eBay?
On eBay, the fee ranges from 11% to 16% depending on the category. Add payment processing fees on top. For a 15% net margin, your gross margin should be at least 30% to 35%. Include all fees as a variable cost before calculating.
How do you calculate profit margin on Etsy and Amazon?
Etsy charges combined fees of roughly 12% to 14% per sale. Amazon charges between 8% and 15% depending on the category, plus fulfillment fees if you use FBA. Include all of these fees as a variable cost before calculating your margin. Your gross margin should also cover shipping, packaging and eventual refunds.
What is the typical profit margin for a restaurant?
Restaurants work with ingredient markups between 200% and 400% (a gross margin of 66% to 80% on the dish), but the net margin after paying labor, rent, utilities and taxes usually ends up between 5% and 15%. Food cost (ingredient cost as a share of the dish's price) should stay between 25% and 35%.
How do you set profit margins for a pharmacy?
Pharmacies work with different margins by category: generic drugs have tightly regulated margins (around 20% to 28%), while cosmetics and supplements allow margins of 40% to 60%. Insurance agreements and discount programs also affect pricing.
Is a 40% markup the same as a 40% margin?
No. A 40% markup means you added 40% on top of the cost. If the cost is $100, the selling price is $140. The real margin is 40 ÷ 140 = 28.57%, not 40%. Never confuse the two metrics: a 40% markup ≠ a 40% margin.
What should I do when my profit margin is too low?
There are three paths: (1) raise the selling price, better communicating the product's value; (2) cut costs, by negotiating with suppliers or optimizing processes; (3) reposition the product toward an audience willing to pay more. Cutting costs indiscriminately can hurt quality and lose customers.
What's the difference between gross margin and net margin?
Gross margin considers only the direct cost of the product (COGS). Net margin also deducts all operating expenses and taxes. For pricing decisions, use gross margin as a base; for business profitability analysis, use net margin.
Should I use margin or markup to price my products?
Prefer working with margin, since it directly represents the percentage of the selling price that is profit — more intuitive for financial goals. Markup is more practical for quick application on cost, but requires care not to confuse it with the equivalent margin. Use the comparison table above to convert between the two.

Related Articles

Deepen your knowledge of pricing and financial management:

Other Calculators

Complementary tools for your business's financial management: