Traffic Density Calculator

Compute traffic density (vehicles per mile) from traffic flow rate and average speed using the fundamental traffic flow equation, then see per-lane density and an HCM level-of-service rating.

Quick Facts

Formula
Density (k) = Flow (q) / Speed (v)
The fundamental traffic flow equation, since flow = density × speed.
LOS scale
HCM density thresholds, A (free flow) to F (breakdown)
Based on vehicles per mile per lane on a basic freeway segment.

Your Results

Calculated
Traffic density
-
Vehicles per mile, all lanes
Density per lane
-
Vehicles per mile per lane
Vehicles on segment
-
Estimated count over the segment length
Level of service
-
HCM density-based rating (A–F)

Ready

Enter flow rate, speed, lanes, and segment length, then press Calculate.

About the Traffic Density Calculator

Traffic density is the number of vehicles occupying a given length of roadway at a given instant, usually expressed as vehicles per mile (or per kilometer). It is one of the three core measurements of traffic flow theory, alongside flow rate (vehicles passing a point per hour) and speed (miles per hour). This calculator applies the fundamental traffic flow equation to compute density from flow and speed, then rates the result against the standard Highway Capacity Manual (HCM) level-of-service scale.

The fundamental traffic flow equation

Traffic engineering rests on one identity that relates the three basic traffic stream measures: flow = density × speed, written q = k·v. Rearranged to solve for density, this calculator uses:

  • k = q / v — density (vehicles per mile) equals flow rate (vehicles per hour) divided by average speed (miles per hour).

This makes intuitive sense: if 1,800 vehicles pass a point every hour and they are traveling at 45 mph, then on average there are 1,800 ÷ 45 = 40 vehicles occupying each mile of that roadway at any moment. Faster average speeds spread the same flow over more distance, lowering density; slower speeds pack more vehicles into the same stretch, raising it.

Per-lane density and total vehicles

Flow rate is typically measured for a whole direction of travel, which may include several lanes. Dividing total density by the number of lanes gives the density each lane carries — the value that level-of-service thresholds are actually defined against. Multiplying total density by the segment length (in miles) gives an estimate of how many vehicles occupy that stretch of road right now.

Level of service (LOS) from density

The Highway Capacity Manual (HCM) rates basic freeway segments on a letter scale from A (best) to F (worst), based on density in passenger cars per mile per lane:

  • LOS A — density up to 11: free flow, vehicles move essentially unaffected by others.
  • LOS B — up to 18: reasonably free flow, slightly reduced freedom to maneuver.
  • LOS C — up to 26: stable flow, speeds and maneuverability more noticeably restricted.
  • LOS D — up to 35: approaching unstable flow, little room to maneuver, small disturbances cause queuing.
  • LOS E — up to 45: operating at or near capacity, no usable gaps, any disruption causes breakdown.
  • LOS F — above 45: forced or breakdown flow, stop-and-go conditions.

This calculator applies those thresholds directly to vehicles per mile per lane. The HCM defines them in terms of passenger-car equivalents under base conditions (free-flow speed, lane width, and truck mix all adjusted for), so treat the LOS letter here as a close approximation rather than an official capacity analysis.

How to get the best results

  • Use vehicles per hour for flow rate and miles per hour for speed — mixing units (e.g., km/h speed with mph-based thresholds) will skew the density and LOS estimate.
  • Enter the number of travel lanes in one direction, not the total across both directions of a divided highway.
  • If you only have a vehicle count and a segment length rather than flow and speed, you can back into density directly as vehicles ÷ miles, then compare it to the same LOS thresholds.

Practical context

This tool models steady, uniform traffic flow — it does not account for signals, incidents, weather, or the passenger-car-equivalent adjustments a full HCM capacity analysis would apply to trucks and grades. Use it for quick estimates and teaching; for regulatory or engineering decisions, use official HCM procedures or consult a traffic engineer.

Frequently Asked Questions

What is the formula for traffic density?
Traffic density (k) equals flow rate (q) divided by speed (v): k = q / v. This comes directly from the fundamental traffic flow equation, flow = density × speed (q = k·v). With flow in vehicles per hour and speed in miles per hour, density comes out in vehicles per mile.
How is level of service (LOS) determined from density?
The Highway Capacity Manual rates basic freeway segments A through F using density per lane in passenger cars per mile per lane: A is up to 11, B up to 18, C up to 26, D up to 35, E up to 45 (near capacity), and F above 45 (breakdown, stop-and-go conditions). This calculator applies those same thresholds to vehicles per mile per lane as an approximation.
Why divide density by the number of lanes?
Flow rate is usually recorded for an entire roadway direction, which can carry several lanes of traffic. Dividing total density by the number of lanes gives the density each individual lane carries — the figure that HCM level-of-service thresholds are actually defined against.