Margin Calculator: Profit, Markup & Selling Price

Free Margin Calculator

Calculate gross profit, profit margin, markup, and the selling price you need to reach a target margin. Include optional shipping and transaction fees to estimate profit after specified costs.

Amounts are in US dollars per unit. This calculator is for pricing estimates, not a full income statement.

What it costs to buy or produce one unit. Don’t enter the same cost twice.
Price after discounts, excluding collected sales tax.
Additional Costs and Fees (Optional)

These affect the adjusted results, not gross margin. Do not double-count anything already included in COGS.

Calculated as a percentage of selling price.

Your Results

Gross Profit
Gross Margin
Markup
Selling Price
Product Cost
Transaction Fees
Profit After Specified Costs and Fees
Margin After Specified Costs and Fees

Enter values and click Calculate.

Adjusted profit is not necessarily net profit. It excludes expenses you haven’t entered. Maximum product cost uses the gross-margin target and does not subtract optional fees.

How to Use the Margin Calculator

Select a calculation mode. Enter your product cost and selling price to calculate margin and markup, or enter a target margin to calculate the selling price or maximum product cost.

Add shipping and payment fees only if you want to estimate profit after those expenses.

Gross Profit and Gross Margin

Gross Profit = Selling Price − COGS

Gross Margin (%) = Gross Profit ÷ Selling Price × 100

A product costing $50 and selling for $100 has $50 gross profit and a 50% gross margin.

Markup

Markup (%) = Gross Profit ÷ COGS × 100

In the same example, markup is 100%, not 50%. Markup divides by cost; margin divides by selling price.

Target Gross-Margin Selling Price

Selling Price = COGS ÷ (1 − Target Margin as a Decimal)

A $50 product needs a minimum selling price of $83.34 to achieve at least a 40% gross margin when prices are rounded to cents.

Target Margin After Additional Costs

Selling Price = (COGS + Shipping + Fixed Fee + Other Costs) ÷ (1 − Target Margin − Processing Fee Rate)

Convert percentages to decimals. This assumes the percentage fee is applied only to the selling price entered here. Your payment processor may charge fees on other amounts.

Maximum Product Cost

Maximum COGS = Selling Price × (1 − Target Gross Margin)

The calculator rounds the answer down to the nearest cent. This mode targets gross margin, not the margin after shipping and fees.

Margin vs. Markup: Comparison Table

These examples assume $100 of COGS, with no additional expenses. Target-margin prices are rounded up to the nearest cent.

Target Percentage Price With That Markup Actual Margin at Markup Price Price for Target Gross Margin
20% $120.00 16.67% $125.00
25% $125.00 20.00% $133.34
30% $130.00 23.08% $142.86
40% $140.00 28.57% $166.67
50% $150.00 33.33% $200.00

Example Including Fees

Suppose a product costs $50, sells for $100, and incurs $5 shipping, a 3% processing fee, and a $0.30 fixed fee.

Gross profit is $50 and gross margin is 50%. Fees total $3.30, so profit after specified costs is $41.70 and adjusted margin is 41.70%.

Frequently Asked Questions

What is the difference between profit margin and markup?

Margin divides profit by selling price. Markup divides profit by product cost. A $60 product sold for $100 has a 40% gross margin and approximately 66.67% markup.

How do I calculate a 25% gross margin?

Divide product cost by 0.75. For $100 of COGS, charge at least $133.34 when pricing in cents.

Can gross margin be negative?

Yes. When selling price is positive but below COGS, gross profit and gross margin are negative.

What happens when selling price is zero?

Gross margin and adjusted margin are undefined because their denominators are zero. The calculator shows “Undefined” instead of an invalid percentage.

What if product cost is zero?

Markup is undefined if cost is zero. Gross margin remains calculable when selling price is positive.

Should shipping and payment fees be part of COGS?

Cost classification depends on the expense and your accounting method. This tool keeps entered shipping and processing fees separate from COGS for clarity. Do not enter the same expense in more than one field.

Does adjusted profit mean net profit?

Not necessarily. It excludes expenses you did not enter, such as rent, salaries, and income taxes. It is an estimate of profit after the specified costs only.

Can I enter a target margin of 100%?

Reverse pricing with positive costs cannot reach a 100% margin at a finite price. Maximum-cost mode allows a 100% gross-margin target, which yields a maximum COGS of $0 if selling price is positive.

Related Calculators

Marginal Cost Calculator

Bar Profit Margin Calculator

Educational pricing estimates only. Verify calculations against your actual business expenses and accounting records.