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

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 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

Related tasks

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

Last reviewed: