FormulaCraft

How to calculate cost per unit in Excel and Google Sheets

Topic:Finance basics
Excel & Google Sheets
=B2/C2

Verified example

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

ProductTotal CostUnitsCost Per Unit
Widget A500100
Widget B750150
Widget C30060
Widget D900180

=B2/C25

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. 1Create three columns: Product, Total Cost, Units Produced.
  2. 2In the Cost Per Unit column (D2), enter =B2/C2 to divide total cost by units.
  3. 3Copy the formula down for all product rows.
  4. 4Format the result column as currency for readability.

Tips

Need it for your exact data?

Describe your columns in plain English and get the precise formula for your sheet, with the right Excel or Sheets syntax.

Frequently asked

What if my units column has blank or zero values?

Use =IFERROR(B2/C2,0) to return 0 instead of a #DIV/0! error when the units cell is empty or zero.

How do I calculate cost per unit for the entire batch at once?

Use =SUM(B2:B6)/SUM(C2:C6) to get a blended cost per unit across all rows.

More on Finance basics

See all →

Formulas used

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

Last reviewed: