🚦

Traffic Density Calculator

Flow rate, speed, density & Level of Service — powered by Greenshields model

Results update instantly as you type. Switch tabs to explore all four calculation modes.

Unit System:
veh/km · km/h
1

🚗 Density from Vehicle Count

Enter the number of vehicles on a road segment and its length to compute density.

2

🛣️ Flow Rate

Calculate flow q = k × u from density and speed, or from a vehicle count over a time period.

3

⚖️ Fundamental Relationship — q = k × u

Enter any two of the three variables (q, k, u) to solve for the third.

4

📈 Greenshields Linear Model

Enter free-flow speed and jam density to derive the capacity curve and optimal operating point.

📈 Flow-Density Curve
Greenshields parabola — enter values above to plot
Parabola (q = uf·k·(1−k/kj)) Operating point Capacity (qmax)

Traffic Flow Formulas Reference

Density

k = n / L

n = vehicles, L = length

Fundamental

q = k × u

flow = density × speed

Greenshields

u = uf(1 − k/kj)

linear speed model

Capacity

q_max = uf·kj / 4

at k_opt = kj / 2

Traffic Flow Theory: Density, Flow & Speed

Traffic engineering rests on three fundamental stream variables that describe the collective behaviour of vehicles on a roadway:

  • Traffic Density (k) — the number of vehicles occupying a unit length of road at any given moment, measured in vehicles per kilometre (veh/km) or vehicles per mile (veh/mi). Density tells you how "packed" the road is right now.
  • Traffic Flow Rate (q) — the number of vehicles passing a fixed point per unit time, measured in vehicles per hour (veh/h). Flow is what you'd count standing by the roadside with a stopwatch.
  • Space-Mean Speed (u) — the average speed of all vehicles in a road section at a given moment, measured in km/h or mph. Space-mean speed differs from time-mean speed; it is the harmonic mean and more accurately reflects travel time.

The three are connected by the fundamental traffic flow equation:

q = k × u

This elegant relationship, analogous to flow = concentration × velocity in fluid mechanics, means that if you know any two variables you can instantly derive the third.

Greenshields Linear Speed-Density Model

In 1935, B.D. Greenshields proposed the first quantitative model of traffic flow. He observed that speed and density follow a linear (inverse) relationship: as density increases from zero towards jam density, speed decreases linearly from free-flow speed towards zero.

The model defines:

  • Free-flow speed (uf) — speed when the road is empty (density → 0).
  • Jam density (kj) — maximum density when traffic is at a complete standstill (speed = 0).

The speed-density equation becomes:

u = uf × (1 − k / kj)

Substituting into q = k × u gives the flow-density parabola:

q = uf × k × (1 − k / kj)

The parabola peaks at the optimal (capacity) point:

  • Optimal density: kopt = kj / 2
  • Maximum flow: qmax = uf × kj / 4
  • Optimal speed: uopt = uf / 2

Despite its simplicity, Greenshields' model remains the foundation taught in transportation engineering courses worldwide. More complex models (Van Aerde, Underwood, Northwestern) refine it, but the fundamental shape — a flow-density parabola — persists.

Level of Service (LOS) — A through F

The Highway Capacity Manual (HCM), published by the Transportation Research Board, classifies operating conditions on freeways using Level of Service grades based on density thresholds:

LOS Density (pc/km/ln) Description Driver Experience
A 0 – 7 Free flow Complete freedom to manoeuvre; very low density, high comfort.
B 7 – 11 Reasonably free flow Slightly reduced freedom; speed slightly below free-flow.
C 11 – 16 Stable flow Noticeable interaction with other vehicles; still stable.
D 16 – 22 Approaching unstable High density; small increases in flow cause speed drops.
E 22 – 28 Unstable flow Operating at or near capacity; minor disturbances cause breakdown.
F > 28 Forced / breakdown flow Stop-and-go waves, queuing, demand exceeds capacity.

Note: HCM LOS thresholds are for basic freeway segments in passenger car equivalents per kilometre per lane (pc/km/ln). Urban arterials and signalised intersections use different criteria.

Real-World Examples

Free-flow freeway (LOS A): At 6 am on a Sunday, an 8-lane motorway carries 4 vehicles per km per lane. Speed is near the posted limit of 110 km/h. Flow ≈ 440 veh/h/ln. Drivers experience maximum comfort and freedom.

Rush-hour freeway (LOS D/E): At 8 am on a Monday, density climbs to 20 veh/km/ln. Speed drops to around 70 km/h. Flow ≈ 1,400 veh/h/ln. Any minor incident now risks triggering stop-and-go waves that propagate upstream for kilometres.

Traffic breakdown (LOS F): An accident reduces a motorway to 2 lanes. Demand exceeds the reduced capacity; density surpasses 28 veh/km/ln. Speed oscillates between 5–30 km/h. Queues stretch back 10+ km. This is the classic gridlock scenario visible in satellite imagery.

Frequently Asked Questions

What is traffic density?
Traffic density (k) is the number of vehicles occupying a unit length of roadway at a given instant, expressed in vehicles per kilometre (veh/km) or vehicles per mile (veh/mi). Unlike flow rate (which is measured over time), density is a spatial snapshot. For example, if 120 vehicles occupy a 5 km segment, density = 120 ÷ 5 = 24 veh/km.
What is the fundamental traffic flow equation?
The fundamental traffic flow equation is q = k × u, where q is flow rate (veh/h), k is density (veh/km), and u is space-mean speed (km/h). This identity links all three primary traffic stream parameters and is analogous to the continuity equation in fluid mechanics. Given any two parameters, you can solve for the third.
What is Level of Service (LOS)?
Level of Service (LOS) is a letter-grade system (A through F) used in the Highway Capacity Manual to describe operating conditions on a roadway. LOS A represents free-flow conditions with maximum driver comfort, while LOS F represents breakdown flow with stop-and-go congestion. For basic freeway segments, LOS is determined by density thresholds: A (0–7), B (7–11), C (11–16), D (16–22), E (22–28), and F (>28 pc/km/ln).
What is free-flow speed?
Free-flow speed (uf) is the average speed of vehicles when density approaches zero — essentially the speed drivers choose in the complete absence of other vehicles and under ideal geometric and environmental conditions. In the Greenshields model, it is the y-intercept of the speed-density line. Typical freeway free-flow speeds range from 90–130 km/h, depending on design standards and posted limits.
What is jam density?
Jam density (kj) is the maximum concentration of vehicles a road can physically hold, occurring when all vehicles are bumper-to-bumper at a complete standstill (speed = 0). It represents total traffic breakdown. For typical passenger cars with an average length of ~5 m and ~2 m gap, jam density is roughly 100–200 veh/km. The Greenshields model predicts maximum flow occurs at exactly half the jam density (kopt = kj / 2).