Fall ResetAmazon USFall reset deals: check better picks before checkoutAmazon US: today's deals, useful picks and quick comparisons.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix NowFall ResetAmazon USWork and home upgrades are worth comparing todayAmazon US: today's deals, useful picks and quick comparisons.See Picks×
Skip to content
Blog

How to Calculate Profit Percentage in Excel (3 Methods)

By TheFinanceBase Team6 min read
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Some links on this page are affiliate links: if you buy through them we may earn a commission, at no extra cost to you.

The standard Excel formula for profit margin percentage is:

=(Selling Price-Cost Price)/Selling Price

If the cost is in A2 and the selling price is in B2, use:

=(B2-A2)/B2

For a $100 cost and $150 selling price, the profit is $50 and the profit margin is 33.33%. Format the result cell as a percentage; do not multiply the formula by 100.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Profit percentage formula in Excel

In everyday business language, “profit percentage” can mean either profit margin or markup. The denominator determines which calculation you are making:

#1 Best Overall
Sale
The Microsoft Office 365 Bible: The Most Updated and Complete Guide to Excel, Word, PowerPoint, Outlook, OneNote, OneDrive, Teams, Access, and Publisher from Beginners to Advanced
  • The Microsoft Office 365 Bible: The Most Updated and Complete Guide to Excel, Word, PowerPoint, Outlook, OneNote, OneDrive, Teams, Access, and Publisher from Beginners to Advanced
  • ABIS BOOK
  • Profit margin: profit divided by selling price or revenue.
  • Markup: profit divided by cost.

For most sales and business reporting, the intended figure is usually profit margin:

Profit = Selling Price - Cost Price
Profit Margin = Profit / Selling Price

Excel formulas begin with =, use - for subtraction, and use / for division. Parentheses ensure Excel calculates the profit before dividing it.

Cost Price Selling Price Profit %
100 150 =(B2-A2)/B2

The formula returns approximately 0.3333. Once the cell is formatted as a percentage, Excel displays 33.33%.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Microsoft’s Excel guidance explains the basic operators used in formulas, while its percentage-formatting guidance explains how decimal values are displayed as percentages.

Method 1: Calculate profit percentage directly

This is the quickest method when your worksheet contains only the cost and selling price.

Assume:

  • A2 contains the cost price.
  • B2 contains the selling price.

Enter this formula in the result cell:

=(B2-A2)/B2

With a cost of $100 and selling price of $150:

  • Profit: $150 − $100 = $50
  • Margin: $50 ÷ $150 = 0.3333
  • Displayed percentage: 33.33%

Best for: quick calculations, small worksheets, and product lists where you do not need a separate profit column.

Limitation: the formula shows the percentage but not the dollar profit. You can calculate the profit separately if you need both figures.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Copying the formula down

When you copy =(B2-A2)/B2 from row 2 to row 3, Excel normally changes it to =(B3-A3)/B3. These are relative references, so each row uses its own cost and selling price.

Method 2: Calculate profit first, then the percentage

Using separate columns makes the worksheet easier to read, check, and expand later.

Set up the columns like this:

Column Contents
A Cost
B Selling Price
C Profit
D Profit %

In C2, calculate the dollar profit:

=B2-A2

In D2, calculate the margin:

=C2/B2

Format D2 as a percentage. For $100 cost and $150 selling price, C2 returns $50 and D2 displays 33.33%.

Best for: business reports, financial models, product catalogs, and any workbook where another person may need to audit the calculation.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

This layout is also easier to adapt when you later subtract discounts, marketplace fees, shipping, or other variable expenses.

Method 3: Use an Excel Table with structured references

An Excel Table is useful for inventory lists, ecommerce catalogs, and transaction data that will grow over time.

  1. Select the range containing your data.
  2. Press Ctrl+T.
  3. Confirm that My table has headers is selected.
  4. Add columns named Cost Price, Selling Price, Profit, and Profit %.
  5. Enter the formula below in the first cell of the Profit % column.
=([@[Selling Price]]-[@[Cost Price]])/[@[Selling Price]]

Excel will generally fill the formula through the calculated column and apply it to new rows added to the Table.

If the Table already has a Profit column, use:

=[@Profit]/[@[Selling Price]]

To suppress errors from blank or zero selling prices, use:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
=IFERROR(([@[Selling Price]]-[@[Cost Price]])/[@[Selling Price]],"")

Best for: repeated sales records, growing product lists, and workbooks where automatic formula propagation is more important than using the shortest possible formula.

Structured references are more readable once familiar, although beginners may find ordinary references such as =(B2-A2)/B2 easier at first.

How to format the result as a percentage

  1. Select the cell or range containing the formula.
  2. Open the Home tab.
  3. In the Number group, select Percent Style (%).
  4. Use the increase- or decrease-decimal buttons to choose the displayed precision.

On Windows, the keyboard shortcut is:

Ctrl+Shift+%

Excel stores 33.33% as approximately 0.3333 and uses percentage formatting to display it as 33.33%. Therefore, use:

=(B2-A2)/B2

rather than multiplying by 100.

The formula below can produce the number 33.33 when the cell uses General formatting:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
=((B2-A2)/B2)*100

That is not automatically mathematically wrong, but it is easy to create a display error if you then apply Percentage formatting. The cell may show 3333%. The safer standard is to return the decimal and apply percentage formatting.

Microsoft notes that formatting a stored whole number such as 10 as a percentage displays 1000%, because Excel interprets the value as 10 rather than 0.10. This is why formatting and formula design need to be treated separately.

Profit margin versus markup

Using the same $100 cost and $150 selling price:

Metric Formula Result
Profit Selling price − cost $50
Profit margin Profit ÷ selling price 33.33%
Markup Profit ÷ cost 50%

In Excel, markup is:

=(B2-A2)/A2

A 50% markup on a $100 cost creates a $150 selling price, but that produces only a 33.33% profit margin. Always state whether the percentage is based on cost or selling price.

Handling errors and special cases

Selling price is zero

The standard margin formula divides by selling price, so a zero selling price produces #DIV/0!. A zero selling price does not represent a zero margin; the margin is undefined because there is no revenue denominator.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use a message:

=IF(B2=0,"N/A",(B2-A2)/B2)

Or return a blank:

=IFERROR((B2-A2)/B2,"")

Selling price or cost is blank

When copying formulas down a partially completed worksheet, explicitly check for missing inputs:

=IF(OR(A2="",B2=""),"",(B2-A2)/B2)

This prevents incomplete rows from displaying misleading results.

For an Excel Table, use:

=IF(OR([@[Cost Price]]="",[@[Selling Price]]=""),"",([@[Selling Price]]-[@[Cost Price]])/[@[Selling Price]])

Cost is greater than selling price

A negative result is valid. If cost is $120 and selling price is $100:

=(100-120)/100

Excel returns -20%. This is a loss margin, or negative profit margin, rather than a formula error.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Cost is zero

If cost is zero and selling price is positive, the formula returns 100%. That may be mathematically correct for the inputs, but it can be commercially unrealistic if shipping, labor, packaging, fees, taxes, or overhead were omitted.

Discounts, fees, refunds, and taxes

The result is only as meaningful as the inputs. Decide what “cost” and “selling price” represent before building the formula.

Possible costs include:

  • Purchase or manufacturing cost
  • Shipping and fulfillment
  • Packaging
  • Marketplace and payment-processing fees
  • Labor
  • Advertising allocation
  • Returns and refunds
  • Import duties and overhead

For a simple gross-style margin based on product cost:

=(Selling Price-Product Cost)/Selling Price

For a more complete contribution margin:

=(Revenue-Product Cost-Variable Fees-Shipping-Other Variable Costs)/Revenue

For net profit margin:

=Net Profit/Revenue

Product cost alone does not necessarily measure total business profitability.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Calculating total profit margin for multiple products

For a combined result, calculate total profit divided by total sales:

=SUM(C2:C10)/SUM(B2:B10)

Here, column C contains profit and column B contains selling price or revenue.

Do not automatically use:

=AVERAGE(D2:D10)

A simple average gives every product equal weight, even when their selling prices differ. The weighted calculation reflects the actual contribution of each product to total revenue.

Calculating a selling price from a target percentage

Target profit margin

If A2 contains cost and C2 contains a target margin entered as 30%, use:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
=A2/(1-C2)

For a $100 cost and 30% target margin, the selling price is $142.86. The profit is $42.86, and $42.86 ÷ $142.86 equals 30%.

Target markup

If A2 contains cost and C2 contains a target markup entered as 30%, use:

=A2*(1+C2)

For a $100 cost and 30% markup, the selling price is $130. The resulting margin is approximately 23.08%, not 30%.

Using fixed assumptions when copying formulas

If a fee percentage is stored in E1 and must remain fixed as you copy a formula down, use an absolute reference:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
=(B2-A2-B2*$E$1)/B2

The $E$1 reference stays fixed while row references change. Microsoft’s guidance on copying percentage formulas describes this use of absolute references.

Quick reference

Goal Excel formula
Profit amount =SellingPrice-CostPrice
Profit margin =(SellingPrice-CostPrice)/SellingPrice
Markup =(SellingPrice-CostPrice)/CostPrice
Price for target margin =CostPrice/(1-TargetMargin)
Price for target markup =CostPrice*(1+TargetMarkup)

Choosing the right method

  • Use the direct formula when you need a compact calculation from cost and selling price.
  • Use the helper-column method when you need to show and audit both dollar profit and percentage.
  • Use an Excel Table when your product or transaction list will grow and formulas should extend automatically.

For a one-off calculation, Excel for the web can be used with a Microsoft account. Desktop Excel is more appropriate when you need advanced workbooks, existing Excel-specific files, or broader Microsoft 365 integration. Google Sheets is a practical browser-based alternative when collaboration and sharing matter. Neither paid software nor accounting software is required for the calculation itself.

The essential rule is simple: divide profit by selling price for margin, divide profit by cost for markup, and format the resulting decimal as a percentage.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Written by TheFinanceBase Team

The Team behind TheFinanceBase.

Add your note

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Outdated Drivers Are Slowing You DownFree scan - exact matches

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.