Finance tools

Profit margin calculator

Free profit margin calculator, gross margin calculator, and margin calculator for US small businesses. Enter cost (COGS) and selling price for live profit margin %, profit dollars, and markup — or set a target margin to find the price you need. Learn how to calculate profit margin for a product with no submit button. Export CSV or PDF when you are done. For markup-first pricing, see our markup calculator.

What profit margin means

  • Find margin (default)

  • Target margin

  • Find markup

Gross vs net profit margin

How to calculate profit margin

Core formulas

  1. Enter cost (COGS)

    What you pay per unit before overhead — materials, wholesale, direct labor.

  2. Enter selling price or target margin

    Find margin from an existing price, or target margin to solve for the price you need.

  3. Read margin, profit, and markup

    Results update as you type. Export CSV or PDF for quotes or pricing models.

How to calculate profit margin for a product

  1. Gather cost per unit

    Include materials, wholesale, packaging, and direct labor tied to one item — not rent, marketing, or payroll overhead.

  2. Set or test selling price

    Use your current price in Find margin mode, or enter a target margin % to solve for the price you need.

  3. Calculate profit margin

    Profit = Price − Cost. Margin % = Profit ÷ Price × 100. Example: $25 profit on a $100 sale = 25% margin.

  4. Compare markup and break-even

    Check equivalent markup % in results, then model volume with the break-even calculator if you have fixed costs.

Quick targets

Margin vs markup

Quick reference

Margin on priceEquivalent markup on costExample ($100 cost)
20%25%Sell at $125 · $25 profit
30%42.86%Sell at $142.86 · $42.86 profit
40%66.67%Sell at $166.67 · $66.67 profit
50%100%Sell at $200 · $100 profit

Worked examples

What is a good profit margin?

IndustryTypical gross marginNotes
Retail & apparel30–50%Higher for boutique; lower for electronics
Grocery5–25%Volume-driven, thin margins
Restaurants60–70%Food cost often 28–35% of menu price
Software / SaaS70–85%+Low COGS; high OPEX elsewhere
Professional services40–70%+Labor-heavy; price on value
Ecommerce (general)20–50%Shipping and fees compress net margin
SectorAvg. gross marginAvg. net margin
Software (system & application)72.4%22.9%
Advertising29.9%3.0%
Business & consumer services33.7%7.1%
Apparel54.3%3.0%

Profit margin in Excel

TaskFormulaExample
Margin from cost & price=(Price-Cost)/Price=(100-80)/100 → 20%
Profit percentage (same as margin)=(Price-Cost)/PriceProfit ÷ revenue as %
Price from target margin=Cost/(1-Margin)=100/(1-0.3) → 142.86
Price from target margin (decimal)=Cost/(1-MarginDecimal)=50/(1-0.35) → 76.92
Profit dollars=Price-Cost=100-80 → 20
Markup from margin=Margin/(1-Margin)=0.2/(1-0.2) → 25% markup

Product margin — not trading margin

Different meaning of “margin”

Frequently asked questions about this profit margin calculator

What is profit margin?

Profit margin is the percentage of selling price that is profit after subtracting cost (COGS). Formula: (Selling price − Cost) ÷ Selling price × 100. A 20% margin on a $100 sale means $20 profit.

How do you calculate gross profit margin?

Subtract COGS from selling price to get profit, then divide by selling price: Gross margin % = (Revenue − COGS) ÷ Revenue × 100. Enter cost and price in Find margin mode for instant results.

What is the difference between gross and net profit margin?

Gross margin uses COGS only. Net margin includes operating expenses, interest, and taxes. This calculator shows product-level gross margin; net margin needs your full P&L.

What is the difference between margin and markup?

Margin uses selling price as the base; markup uses cost. 25% markup = 20% margin on the same sale. Use our markup calculator for markup-first pricing and margin ↔ markup conversion.

Is 30% markup the same as 30% margin?

No. 30% markup on $100 cost → $130 price → 23.08% margin ($30 profit ÷ $130). To earn a 30% margin on $100 cost, sell at $142.86. Use Target margin mode here or the Convert tab on the markup calculator.

What is 30% margin on $100?

If you mean $100 selling price with 30% margin, profit is $30 (cost would be $70). If you mean $100 cost with a 30% margin target, sell at $142.86 — use Target margin mode.

How do I calculate a 20%, 30%, 35%, or 70% profit margin price?

Divide cost by (1 − margin as decimal): Price = Cost ÷ (1 − 0.30) for 30% margin. Examples on $100 cost: 30% → $142.86; 35% → $153.85; 70% → $333.33. The calculator’s Target margin mode does this live.

What is a good profit margin?

It depends on industry and whether you mean gross or net margin. Many product businesses target 30–50% gross margin; SaaS often exceeds 70% gross but lower net after payroll. Is 30% profit margin a lot? For retail and physical goods, yes — it is strong. Is 40% or 50% margin high? Common in software and services; rare in grocery. Negative margin means you lose money on each sale. See the industry tables above.

How do I calculate profit margin in Excel?

With cost in A1 and price in B1: profit =B1-A1, margin =(B1-A1)/B1 formatted as percentage. Target price for 30% margin: =A1/(1-0.3). Same formulas work in Google Sheets. Or export CSV from this calculator.

What is the profit margin formula?

Gross profit margin % = (Selling price − Cost) ÷ Selling price × 100. Equivalently: Profit ÷ Revenue × 100. To solve for price: Selling price = Cost ÷ (1 − Margin% ÷ 100).

Is this for product pricing or stock/forex margin?

Product and service pricing only. Stock, forex, and brokerage “margin” mean borrowed capital — not gross profit margin on a sale. This tool uses COGS and selling price.

How is this different from your markup calculator?

This page is margin-first (default: find margin from cost + price). The markup calculator is markup-first with a Convert tab. Both share the same math and export — pick the URL that matches how you search.