FormulaCraft

How to calculate profit margin in Excel and Google Sheets

Topic:Finance basics
Excel & Google Sheets
=(B2-A2)/B2

Verified example

Computed by a real spreadsheet engine on the sample data below.

CostRevenueProfit Margin
80100
6090
150200
300450

=(B2-A2)/B20.2

Try it with your data

Edit the grid or formula, then run it through a real spreadsheet engine — no signup.

Sample data — click any cell to edit

Runs server-side · free · no signup

Step by step

  1. 1Set up two columns: Cost (A) and Revenue / Selling Price (B).
  2. 2In the Profit Margin column, enter =(B2-A2)/B2. This subtracts cost from revenue to get profit, then divides by revenue.
  3. 3Format the result as Percentage. For example, a cost of $80 and revenue of $100 yields a 20% profit margin.

Tips

Working on a sheet you inherited? Run the Auditor on the whole file first — it flags every #REF!, #N/A, broken column pattern, and inconsistent formula in seconds, free, no signup.

Frequently asked

What is a good profit margin?

It varies by industry. Retail averages 2–10%, software 20–40%, and professional services 15–25%. Compare to industry benchmarks.

How is profit margin different from markup?

Margin is profit divided by revenue; markup is profit divided by cost. A 25% markup corresponds to a 20% margin.

More on Finance basics

See all →

Formulas used

Related tasks

Written and reviewed by FormulaCraft Team. Each formula on this page is run through our verification engine before publishing.

Last reviewed: