Skip to content
Everyday Life

Traffic Density Calculator

Enter the number of vehicles on a road segment and its length to get traffic density instantly. Switch modes to solve for flow or speed using the fundamental flow-speed-density equation. You also get average headway between vehicles, a level-of-service (LOS) grade, and a step-by-step breakdown of the maths. Choose metric (vehicles/km, km/h) or imperial (vehicles/mile, mph) units.

Your details

The fundamental equation is: Flow = Speed x Density. Pick what you want to find and supply the other two values.
Count of vehicles occupying the road segment at one instant in time.
vehicles
Length of the road section being studied.
km
Total lanes in the direction of travel. Used to compute per-lane density for LOS grading.
lanes
Traffic densityLOS D - Approaching unstable
40

Vehicles per unit length of road

Density per lane20
Average headway25
Level of serviceLOS D - Approaching unstable
20 veh/km/lane
LOS A<7LOS B7-11LOS C11-16LOS D16-22LOS E22-28LOS F28+
02k5k075150
Density (veh/km)
Flow (veh/h)
Density (veh/km)Greenshields flow-density curve
00
5580
101k
152k
202k
253k
303k
353k
404k
454k
504k
554k
604k
654k
704k
755k
804k
854k
904k
954k
1004k
1054k
1104k
1153k
1203k
1253k
1302k
1352k
1401k
145580
1500

Density: 40.00 veh/km - LOS D - Approaching unstable

  • Traffic density is 40.00 veh/km - Approaching unstable.
  • Average spacing between vehicles is about 25.0 m bumper-to-bumper.

Next stepLOS D/E signals congestion approaching capacity. Consider demand spreading, signal coordination, or additional lanes if this persists during peak hours. Enter a speed to also compute flow using the fundamental equation: Flow = Speed x Density.

What is traffic density?

Traffic density (also called occupancy density) is the number of vehicles present on a unit length of road at a given instant in time. It is usually measured in vehicles per kilometer (veh/km) or vehicles per mile (veh/mi), and it is one of three fundamental variables that describe traffic flow. The other two are traffic flow (vehicles per hour) and average travel speed. The three are linked by the fundamental equation: Flow = Speed x Density. If you know any two of them, you can calculate the third, which is why this calculator offers three modes.

How to calculate traffic density

The direct formula is: Density = Number of vehicles on segment / Length of segment. For example, if 80 vehicles are spread across a 2 km road, the density is 40 veh/km. For level-of-service (LOS) grading, divide the total density by the number of lanes to get the per-lane value. A per-lane density below 7 veh/km is LOS A (free flow), while anything above 28 veh/km is LOS F (breakdown). Average headway - the bumper-to-bumper gap between successive vehicles - is simply the reciprocal of density: headway (km) = 1 / density (veh/km), then multiply by 1,000 to get meters.

The fundamental flow-speed-density equation

Greenshields (1935) proposed the first mathematical model of traffic flow, based on the observation that average speed decreases linearly from the free-flow speed (no vehicles) down to zero at jam density (bumper-to-bumper gridlock). The resulting flow-density curve is a parabola that peaks at the capacity flow rate roughly halfway to jam density. Modern models such as Greenberg and Underwood use logarithmic or exponential speed-density curves for better fits, but the Greenshields linear model remains the standard teaching tool and is shown in the chart below. This calculator uses it to draw the flow-density curve for your unit system and a typical free-flow speed.

Level of service (LOS) explained

Level of service is a letter grade from A to F that summarises driver experience on a roadway, defined by the U.S. Highway Capacity Manual (HCM). For basic freeway segments, LOS is assigned based on per-lane density in veh/km. LOS A and B represent free-flow conditions where drivers have full choice of speed and lane. LOS C and D describe stable but increasingly constrained flow. LOS E means the road is at or near capacity, and any minor disturbance can trigger a queue. LOS F signals breakdown: demand exceeds supply, queues form and persist, and travel times become unpredictable. Urban planners typically aim to keep peak-hour conditions at LOS D or better.

Highway Capacity Manual - Level of Service thresholds (basic freeway segments)

LOSDensity (veh/km/lane)ConditionsDriver experience
A0 to 7 Free flow Complete freedom of speed and lane choice
B7 to 11 Reasonably free flow Slight restriction; drivers notice other vehicles
C11 to 16 Stable flow Perceptible interaction; less freedom to maneuver
D16 to 22 Approaching unstable Little freedom to maneuver; poor incident tolerance
E22 to 28 Unstable flow Near capacity; any disruption causes queues
F28 + Breakdown / forced flow Demand exceeds capacity; stop-and-go conditions

Per-lane density thresholds from the HCM. LOS A = free flow; LOS F = breakdown. Values are in vehicles per kilometer per lane.

Frequently asked questions

What is the difference between traffic density and traffic flow?

Traffic density is how many vehicles occupy a stretch of road at one moment in time (vehicles per km or mile). Traffic flow, by contrast, counts how many vehicles pass a fixed point over a period of time (vehicles per hour). They are related by speed: flow = speed x density. A road can have high flow but moderate density if vehicles are moving fast, or high density but low flow when traffic crawls.

What is the typical jam density for a freeway?

Jam density is the maximum density at which traffic can no longer move - vehicles are bumper to bumper. For a single freeway lane, jam density is typically around 150-180 vehicles per kilometer (roughly 240-290 vehicles per mile). At that point, flow drops to zero and the average headway between vehicles equals the average vehicle length plus a small gap.

How is headway calculated from density?

Headway is the average distance (or time) between successive vehicles. Space headway in km = 1 / density (veh/km). Multiply by 1,000 to get meters. So if density is 40 veh/km, the average gap is 1/40 = 0.025 km, or 25 meters. Time headway in seconds = headway (m) / speed (m/s), assuming all vehicles travel at the mean speed.

What does LOS F mean and when does it occur?

LOS F indicates demand exceeds capacity. It occurs when per-lane density exceeds roughly 28 veh/km (about 45 veh/mi) on a freeway. Traffic operates in stop-and-go waves: vehicles decelerate to a stop, then creep forward as the queue discharges. LOS F typically happens during peak hours, after incidents, or at bottlenecks such as merges and lane drops.

Can I use this calculator for city streets instead of freeways?

Yes, the density and headway calculations apply to any road type. However, the LOS thresholds shown (and used in the gauge) are from the HCM for basic freeway segments. Urban arterials and signalised intersections use different LOS measures based on control delay rather than density, so treat the LOS grade as an approximation when applied to city roads.

What units does traffic density use?

In metric countries, traffic density is expressed in vehicles per kilometer (veh/km) or vehicles per kilometer per lane (veh/km/lane). In the United States and the UK, vehicles per mile (veh/mi) is common. The two are related by the conversion 1 mile = 1.60934 km, so 1 veh/mi = approximately 0.621 veh/km. This calculator lets you switch between metric and imperial units.

Sources

Written by Grace Mbeki, MSc Data Scientist & Educator · Nairobi, Kenya

Turning everyday numbers into clear, actionable answers for the decisions that matter most.

Search 3,500+ calculators

Loading search…