Traffic Density Calculator
Turn vehicle counts and a road length into flow, density, speed and headway.
Six time scales, nine length units and six speed units, metric or imperial.
Updated November 28, 2026
What the four quantities measure
Traffic on a road is described by four numbers, and they are not interchangeable measurements of the same thing. Two of them are counted over time, two are read from a single moment.
The calculator keeps all four consistent by working in metres and seconds underneath, and then showing the answer in whichever unit you picked. That is why a flow quoted per hour, a density quoted per kilometre and a speed quoted in kilometres per hour still agree with each other exactly: the conversion happens before the arithmetic, not after it.
Four quantities
Two counted over time, two read at one instant
Four relationships
Any box is solved from the ones you fill in
Four unit menus
Window, flow rate, length and speed
Traffic flow
How many vehicles pass one point in a given time. Engineers quote it per hour, so a junction carrying 900 vehicles between 08:00 and 08:30 is running at:
Traffic density
How many vehicles occupy a stretch of road at one instant. Twenty vehicles spread over a kilometre of lane is , and it says nothing about how fast anybody is moving.
Average travel speed
How fast the vehicles on that stretch are actually moving, not the posted limit. This is the number that falls first when a road gets busy.
Headway
The front-to-front distance between one vehicle and the next. It is the reciprocal of density, so a density of is a headway of .
Why three of them are called fundamental
The three big ones — flow, density and speed — are called the fundamental characteristics of a traffic stream because any two of them fix the third. Count the vehicles through a point, count the vehicles on a measured stretch, and the calculator can tell you the average speed without a speed gun anywhere in sight.
How to use the calculator
Count what passes a point, during a window you timed
Enter how many vehicles passed and how long you watched. That pair gives the traffic flow, and the flow box shows it in the rate unit you picked:
Count what occupies a stretch you measured
Enter the vehicles you can see on the stretch and its length. The headway box fills itself in from the density you have just produced:
Add a speed, or stop whenever the answer you need is filled
With a density and a flow already in place, the speed box resolves itself. If instead you know the speed from a sign or a GPS trace, type it and the flow will resolve against the density you measured. Any box you fill in becomes a given, and any box you leave empty is the calculator's job.
Two boxes share one name on purpose
Both groups start with a box called “No. of vehicles”, and they are not the same measurement. The first counts vehicles that pass a point while you watch; the second counts vehicles standing on a stretch at one instant. Mixing them up gives a density that is really a flow, or the other way around.
The four relationships
Four statements describe the whole calculator. One relates all three of the fundamental quantities, and three are simple divisions that fill in the rest.
1. Flow from density and speed
The fundamental identity. It only holds without a correction factor when density is vehicles per metre and speed is metres per second, which is exactly how the calculator stores both before showing them in your chosen unit. Either factor can be solved back from the other two:
2. Flow from a counted window
A count divided by the time it took. Reverse it when you know the rate and want the number of vehicles a longer window should deliver, or the window a rate implies for a count you already have.
3. Density from a measured segment
A count divided by a length. This is a snapshot, so the vehicles have to be on the segment at the moment you look — not a total that accumulated over the afternoon.
4. Headway is one over density
If a kilometre of lane holds 20 vehicles, the average front-to-front spacing is a kilometre divided by 20, or 50 m. The relation runs both ways, so a headway you can measure from the roadside gives you the density directly:
What the unit menus actually do
Nothing reaches the arithmetic in the unit you typed it. Every entry is normalised into metres and seconds first, and every factor below is the exact definition rather than a rounded convenience value:
| Entry | Conversion into the formula’s base |
|---|---|
| vehicles per hour | divide by 3,600 to get vehicles per second |
| vehicles per kilometre | divide by 1,000 to get vehicles per metre |
| kilometres | multiply by 1,000 to get metres |
| miles | multiply by 1,609.344 |
| nautical miles | multiply by 1,852 |
| kilometres per hour | divide by 3.6 to get metres per second |
| miles per hour | multiply by 0.44704 |
| feet per second | multiply by 0.3048 |
| feet per minute | multiply by 0.00508 |
| knots | multiply by 1,852, then divide by 3,600 |
| months | one twelfth of a Julian year, 2,629,800 seconds |
That is why switching the unit menu never changes an answer, only how it is written.
A worked example on one lane
One measurement session, one lane, and every box on the page filled in. This is the situation the three groups are designed for: a count over time and a snapshot of a stretch, taken at the same moment.
One lane, two lamp posts and a minute of counting
Situation: You are watching a single lane between two lamp posts 200 m apart. At 09:30 there are four vehicles between the posts, and during the following minute thirty vehicles pass the far post. That is enough to describe the lane completely.
What goes in
What comes out
In practice: A 50 m spacing at 25 m/s is a time gap between vehicles of two seconds. That is the number drivers actually feel, and it closes the loop: one vehicle every two seconds works out to the same 1,800 vehicles per hour that you counted. When a counted flow and an observed time gap disagree like this, one of the two measurements is wrong, and that arithmetic is worth doing before you trust either.
Turn the distance into a time gap, and check it
The speed was never measured — the fundamental identity produced it from the count and the snapshot. Divide the headway by that speed and the answer becomes a time gap, which is what a driver following another car can actually judge:
Two seconds per vehicle and 1,800 vehicles per hour are the same statement. If they ever disagree for a road you measured, the count or the segment length is off, not the formula.
Reading density and headway
Density is the quantity traffic engineers reach for when they want to describe congestion, because it does not depend on the speed limit. The gaps below are the exact headways the calculator returns for each density, so they are a conversion table rather than a set of opinions. The descriptions are a rough guide for one lane of mixed light vehicles.
| Density | Headway | What the lane looks like |
|---|---|---|
| under 10 veh/km | over 100 m | Free flow; the gaps are longer than most junctions. |
| 10 to 30 veh/km | 33 to 100 m | Light traffic; you can join from a side road comfortably. |
| 30 to 60 veh/km | 17 to 33 m | Busy; speeds start to sit below the limit. |
| 60 to 100 veh/km | 10 to 17 m | Heavy; a four-second hesitation from anyone ripples backwards. |
| 100 to 150 veh/km | under 10 m | At or near the jam density for cars; the flow itself is falling. |
| over 150 veh/km | under 6.7 m | A standing queue rather than moving traffic. |
These numbers are per lane
A three-lane carriageway at 40 vehicles per kilometre per lane reads 40 in the density box if you measured one lane, and 120 if you counted all three. Neither is wrong, but the two cannot be compared against the same per-lane reference. Decide before you count, and keep the count, the length and the lane count describing the same piece of road.
Measuring advice
The arithmetic is exact; the uncertainty lives in the count and the measured length. A few habits keep the result inside the accuracy a manual survey can honestly claim.
Watch for at least five minutes
At a busy rate of 1,800 vehicles per hour, five minutes covers about 150 vehicles, which is enough for a stable rate. A one-minute count is dominated by whether a platoon happened to arrive. The window can be any length you like; a longer one costs nothing here.
Measure the segment on a map, not by pacing
The length is the denominator of the density, so a 10% error in the length is a 10% error in density. Use a mapping tool or an odometer between two landmarks, and pick landmarks you could stand at — a lamp post, a sign, a bridge joint.
Keep the count and the snapshot at the same time
Flow is averaged over the window; density is a single instant. On steady traffic the two simply combine. At the moment a queue forms or clears they describe different regimes, and the average speed you get out will be a blend of the before and after.
Repeat at peak and off-peak
The result is one rate for one moment, not a daily average. Running the same measurement at 08:30 and at 11:00 is often more informative than any single number.
The same arithmetic works for pedestrians and bicycles
Count people through a gate or bicycles along a path and the four relationships hold exactly as they do for cars, as long as you read “vehicle” as one unit of whatever you are counting. It is the density comparisons that stop transferring — a crowd and a car park do not jam at the same spacing.
Assumptions and limits
Steady traffic is assumed
The fundamental identity relates long-run averages. A gap in which nothing arrives and a platoon that arrives together average out to a flow that describes neither, so read the result as a rate for a road that is behaving consistently over the window you measured.
Headway here is a distance, not a time
The headway box is the front-to-front spacing in metres. The two-second rule and everything quoted in seconds is a time headway, which is that distance divided by the speed. Both are useful; they are not the same number.
Density is capped at a physically possible value
A density above 500 vehicles per kilometre (half a vehicle per metre) leaves two metres of road per vehicle, which no car, van or lorry queue can achieve. The calculator keeps the number visible and flags it rather than pretending it solved something.
The flow warning is per-lane capacity
Above 7,200 vehicles per hour through one point the result is flagged: a single lane peaks near 2,400. If you counted several lanes at once, the number is legitimate and the flag is a reminder to divide by the lane count before comparing with per-lane figures.
Not a substitute for a traffic survey
A manual count is fine for understanding a road, checking a congestion complaint or sanity-checking a transport model. Statutory counts, junction design, signal timing and anything with a safety case need calibrated counters and a qualified highway engineer; a phone timer and a pair of lamp posts are not that.
Questions that come up
Why can the flow be zero when vehicles are present?
Flow counts vehicles crossing a point per unit time, so it drops to zero in two very different situations: an empty road, and a completely stationary queue. Density tells them apart — near zero for the empty road, at jam density for the queue. If you see a zero flow with a high density, you have found a jam rather than a quiet road.
Which of the two vehicles boxes do I fill in?
Fill the one in the Traffic flow group if the vehicles were moving past you — a tally over time. Fill the one in the Traffic density group if they are spread out on a stretch you can see right now — a snapshot. If both apply, fill both: they are independent measurements of the same road and together they pin the speed down.
How accurate can a roadside count be?
For short manual counts, a few percent either way is realistic; heavy vehicles, dark and rain make it worse. The arithmetic is exact, so the uncertainty in the answer is the uncertainty in your count and your measured length, not in the formula. That is also why the calculator keeps every digit it can rather than rounding to whole vehicles.
Does the direction of travel matter?
Yes. These quantities are per direction of travel, so vehicles going the other way are not part of the count. On a divided carriageway that is natural; on a two-way road, pick one direction and stay with it for both the count and the segment snapshot.
Can I use it for pedestrians or bicycles?
The algebra is the same for any stream of things — people through a gate, bicycles on a path — as long as you read “vehicle” as one unit of whatever you are counting. The density ceiling and the capacity warning are calibrated for motor traffic, so treat them as loose sanity checks rather than limits for a crowd.
Related Calculators
Bra Size Calculator
Convert an underbust and bust measurement into US, UK and EU bra sizes, with cup letters and sister sizes in centimetres or inches.
Dress Size Calculator
Turn bust, waist and hip measurements into US, UK, EU and international dress sizes, with a consensus size and the spread between them.
Sock Size Calculator
Turn a US, UK/AU or EU shoe size into the sock size band and general size name, for adults and for children by age or shoe size.
Sunglasses Size Calculator
Turn forehead, cheek, jawline and face-length measurements into a lens-bridge-temple sunglasses size in millimetres, plus your face shape and lens depth.
Appliance Depreciation Calculator
Value a used appliance from its age and replacement price: see the actual cash value, or solve back for the age, the price or the depreciation rate.
0-60 Calculator
Estimate your vehicle's 0-60 mph acceleration time based on engine power, weight, drivetrain, tires, and road conditions.