MarginCalculator.ioKnow your numbers. Price with confidence.
Free calculators for smarter decisionsExplore tools
Free business & finance tools

Margin Calculator.
Price with confidence.

Turn costs into clarity. Calculate profit margin, markup, ideal selling prices and fees in seconds, then explore purpose-built tools for business, e-commerce and finance.

No sign-upInstant resultsClear formulas
Margin snapshot
50%

Sample gross profit margin

Sample selling price$100.00
Sample product cost$50.00

Illustrative example, not live data

Clear profit metrics

Margin, markup and profit side by side

Smarter pricing

Work backward from a target margin

More realistic estimates

Account for shipping and processing fees

Margin Calculator

Use amounts per unit, after discounts and excluding collected sales tax. Gross margin excludes optional costs; adjusted margin includes only entered costs.

Currency changes display only; no exchange-rate conversion. Estimates are for education and planning, not personalized accounting, tax or financial advice.

Your results

Enter figures and select Calculate.

Advanced Costs (Tax, Tariffs, Returns, Units)

Estimate period profitability after sales tax, import duties, refunds, payment fees and other entered costs. This optional tool is separate from the main calculator.

Use one currency for all monetary inputs. No exchange-rate conversion.
Enter the listed price before or including tax, depending on the selected mode.
Exclude import duty and any costs entered separately.
One unit per order is assumed for fixed fees.
Editable estimate. Tax collected for authorities is not seller revenue.
Use your applicable customs valuation, not retail price.
Enter your verified rate. No tariff lookup is performed.
Assumed incurred for every order.
Applied to tax-inclusive checkout value in this model.
Additional fixed charge for each one-unit order.
Expected share of orders fully refunded.
Enter expected resale or recoverable cost, at most landed unit cost.
Additional cost for each expected return.
100% means fees are not refunded; 0% means fully refunded.
Do not enter any costs already counted above.
Optional fixed costs attributable to these orders.

New Business and E-Commerce Calculators

Choose a focused calculator with transparent assumptions and worked examples.

Built for better decisions

Find the right calculator.

Explore focused tools for everyday pricing, e-commerce selling, investing and economics. Start with the question you want to answer.

Profit, margin & pricing

E-commerce & marketplaces

Investing, statistics & economics

Browse the full calculator directory →

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.

Free spreadsheet: Prefer working offline? Explore our free profit margin and product pricing spreadsheets for Excel and Google Sheets.

Related Calculators

Explore our print-on-demand, TikTok Shop, Walmart seller and dropshipping profit calculators.

Explore specialized tools for minimum profitable orders, profit after returns, subscription boxes and cleaning business profitability.

For VAT, GST and sales tax with eligible purchase tax recovery, use the international VAT and GST margin calculator.

Keep multiple pricing plans for later comparison in the saved pricing scenarios workspace.

Test price changes and rising costs with the profit margin sensitivity calculator.

Need to compare multiple products? Use the multi-SKU batch profit margin calculator to import a CSV and compare up to 200 products.

Marginal Cost Calculator

Bar Profit Margin Calculator

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