How to calculate Freight Cost per Unit

Freight cost per unit is the average shipping cost attached to each unit shipped.

Formula

Freight cost per unit = total freight cost ÷ units shipped

SQL query

This example assumes: shipments(id, carrier, shipped_at, freight_cost, units). It is written in PostgreSQL syntax; date functions differ slightly in MySQL, BigQuery and SQLite, and your column names will differ from these.

SELECT carrier,
       SUM(freight_cost) / NULLIF(SUM(units), 0) AS freight_per_unit
FROM shipments
WHERE shipped_at >= DATE '2026-07-01'
GROUP BY carrier
ORDER BY freight_per_unit;

Common mistakes that make Freight Cost per Unit wrong

  • Surcharges and invoices that arrive later make recent months look cheaper.
  • Units differ in size; consider cost per kilogram or per pallet for fair comparisons.
  • Different lanes cost differently; compare carriers on the same lanes.

Ask for Freight Cost per Unit in plain English

Instead of writing the query yourself, you can type the question. SchemaChat turns it into SQL against your connected database or uploaded file, runs it, and shows the SQL and the figures it used so you can check the answer before you share it. It does not replace your judgement about the definition: check that the query matches the formula your business uses.

  • Which carrier has the lowest freight cost per unit on the same lanes?
  • How has freight cost per unit trended this year?

Frequently asked questions

What is Freight Cost per Unit?
Freight cost per unit is the average shipping cost attached to each unit shipped.
How do you calculate Freight Cost per Unit?
Freight cost per unit = total freight cost ÷ units shipped. The SQL example on this page shows the same calculation against a simple table.
What commonly goes wrong when calculating Freight Cost per Unit?
Surcharges and invoices that arrive later make recent months look cheaper.