Every fall, someone at a small transit agency opens a spreadsheet and starts typing in numbers that already exist somewhere else. Revenue miles. Revenue hours. Route mileage. The same schedule already produced a General Transit Feed Specification (GTFS) feed for Google Maps. It gets retyped by hand into the National Transit Database (NTD) reporting forms anyway, because nobody connected the two.

That connection is not automatic, and it is not complete. GTFS NTD reporting works for some of the service data NTD wants. It fails quietly for the rest, in ways that can put a wrong number on a federal filing if nobody checks. This piece maps which GTFS fields feed which NTD data elements, then walks two of them through a worked calculation. It closes with the four places a naive derivation goes wrong. Getting those four right matters more than the mapping itself.

Can GTFS Data Be Used for NTD Reporting?

Partly, and only with care. A well-built GTFS feed can produce a defensible starting point for vehicle revenue miles, vehicle revenue hours, and directional route miles. It cannot produce ridership, passenger miles traveled, or financial data. A naive derivation will also misstate the fields it does support, unless deadhead and scheduled-versus-operated service are both handled correctly.

The Mapping: GTFS Fields to GTFS NTD Reporting Elements

Four NTD service data elements have a genuine GTFS source. The rest do not. Pretending otherwise is how a filing goes wrong. The four matter most to a Full Reporter, generally an agency operating more than 30 vehicles in maximum service across all modes. A smaller Reduced Reporter still benefits from the same mapping, since the underlying service data categories do not change with reporter type.

NTD data elementWhat FTA wantsGTFS sourceWhat the feed alone cannot tell you
Vehicle Revenue MilesMiles operated in revenue servicetrips.txt, stop_times.txt, and shapes.txt if present, for scheduled trip distanceDeadhead, and whether the trip actually ran as scheduled
Vehicle Revenue HoursHours operated in revenue servicestop_times.txt arrival and departure times across a trip’s stop sequenceLayover and recovery time coded correctly, and actual delay
Directional Route MilesRoute path length, measured once per direction of travelshapes.txt, or routes.txt paired with a mapped pathWhether the shape reflects the street network or a straight line between stops
Vehicles Operated in Maximum ServicePeak concurrent vehicles in revenue service on the busiest daytrips.txt and stop_times.txt, checked for schedule overlap across a service patternAdded trippers, cancellations, and any day that ran differently than scheduled

Nothing in that table is a full derivation. Each row is a scheduled estimate. It has to be reconciled against what dispatch or Computer-Aided Dispatch / Automatic Vehicle Location (CAD/AVL) data says actually happened before it belongs in a report. The gtfs.org schedule reference defines every field named above. None of them were designed with NTD in mind, which is exactly why the fit is partial.

Example: Route 5, one weekday PlannedRan T1T2T3T4T5T1T2T4T5 Cancelled 5 trips in GTFS4 trips for NTD Dotted: deadhead, not counted

Vehicle Revenue Miles From a GTFS Feed

Start with one service pattern, one weekday service_id in calendar.txt. For every trip that pattern includes, sum the distance covered between the first and last stop in stop_times.txt. Where shapes.txt exists, shape_dist_traveled gives that distance directly. Where it does not, the distance has to come from a road-network calculation against the stop sequence. A straight-line distance between stops undercounts the road actually driven.

Multiply that per-trip total across every trip in the pattern to get a scheduled daily figure. Then multiply again by the number of days that pattern actually operates across the report year. Read calendar.txt for the base weekly pattern, and calendar_dates.txt for the added and removed exceptions layered on top. The result is scheduled vehicle revenue miles for the year, not vehicle revenue miles as NTD defines the term. That distinction is not a technicality. It is the entire subject of the next section.

Vehicle Revenue Hours

The hours calculation follows the same shape with one added trap. For a single trip, revenue hours run from the departure time at the first stop to the arrival time at the last stop, both read from stop_times.txt. Summed across every trip and annualized the same way as revenue miles, that produces a scheduled hours figure.

The trap is layover and recovery time. FTA’s own definition of revenue time includes it. Time a vehicle spends recovering at the end of a route before its next scheduled departure counts as revenue time, not deadhead, per the FTA National Transit Database Glossary. A GTFS feed built purely from stop_times.txt timestamps often has no clean way to isolate that recovery window. It sits inside the gap between one trip ending and the next one starting on the same block. Get that wrong in either direction and vehicle revenue hours comes out too low or too high. Nobody notices until a reviewer asks why the number moved.

Directional Route Miles, the One People Get Wrong

Directional route miles is not a count of how many miles vehicles drove. It is the length of the route path itself, measured once in each direction of travel, regardless of how many trips ran it that year. FTA’s glossary defines it as the mileage over which vehicles travel while in revenue service. That measurement disregards the number of traffic lanes and excludes staging or storage areas.

The naive error is treating shapes.txt distance as if multiplying it by trip count were the point. It is not. A route that runs many trips a day on a 6-mile path still has 6 directional route miles in each direction. That is 12 total for a round trip that does not retrace itself exactly. The correct source is the shape itself, taken once, not summed across every scheduled run of it. Confusing directional route miles with the annualized mileage figure above is a common way a small agency gets this line wrong.

Where the Definitions Diverge

Four gaps separate what a GTFS feed can produce from what NTD requires, and each one can put a wrong number on a filing if it goes unchecked.

Deadhead. GTFS has no concept of deadhead at all. trips.txt records revenue trips only. Pull-out miles from the garage to the start of a route, pull-in miles back, and any repositioning between routes never appear in the feed. A derivation built only from GTFS will never include deadhead. That is correct for vehicle revenue miles and hours, since NTD excludes deadhead from both. The risk runs the other way. Someone reconciles a GTFS-derived figure against a fleet mileage total from maintenance records, which does include deadhead. They then assume the gap between the two numbers is an error rather than the expected difference.

Non-revenue service. Operator training runs, maintenance test drives, and charter service are excluded from vehicle revenue miles and hours by FTA definition, the same way deadhead is. GTFS was never built to encode any of these, so a feed-only derivation correctly omits them by default. The failure case is a scheduling shortcut. Some agencies encode a repositioning move as a low-frequency GTFS trip so an internal routing tool has something to reference. That trip then gets counted as revenue service by an automated derivation that trusts every row in trips.txt equally.

Scheduled versus operated service. GTFS states intent, published in advance. NTD wants what actually ran. A trip gets cancelled for a mechanical failure. A route gets truncated for a detour. Or a service change goes live mid-year without a matching feed update. Any one of these opens a gap between the schedule and what an agency actually delivered. Dispatch or CAD/AVL data is the only source that closes that gap. That is why scheduled service reconciled against operated service has to happen before a GTFS-derived number goes on a report, not after.

Layover and recovery time. Covered above as a mechanical trap, it is also a definitional one. FTA’s glossary explicitly includes layover, recovery time, and rider loading time inside revenue time and revenue mileage, while excluding deadhead, training, and maintenance testing. An agency that assumes any idle time at the end of a route must be deadhead makes a specific mistake. It strips real revenue time out of an hours calculation, understating vehicle revenue hours against FTA’s own definition, and calls it a correction rather than the error it actually is.

What Can’t GTFS Give You for NTD Reporting?

Three major NTD elements have no GTFS source at all, and no amount of clever field mapping changes that. Unlinked passenger trips and passenger miles traveled require a farebox, an automated counter, or a certified sampling program. GTFS describes a plan for service, not who rode it or how far. FTA’s sampling standard for these figures is commonly built around a 95% confidence level with 10% precision, a bar no schedule file was designed to clear.

An agency that counts with Automated Passenger Counting hardware instead carries a separate FTA requirement. That equipment needs certification against manual counts, then recertification on a recurring cycle, currently every 3 years. Passenger miles traveled, explained covers how the figure is actually derived. Financial data, meanwhile, comes from a general ledger, not a feed of any kind.

TransitFare is a transit technology company founded in 2012 that builds Automated Passenger Counting and GTFS publishing tools for small and mid-sized transit agencies running 10 to 50 vehicles. Its deployed systems have counted 18 million passenger boardings via APC, and the platform behind them has maintained a strong production reliability record. Whatever the tools, the basic split holds. GTFS tells NTD what an agency planned to run. Everything about who rode it, and what it cost, has to come from somewhere else.

Close the Gap Between What You Publish and What You File

The service data mapping above is a starting point, not a finished report. The four divergence points are exactly where a starting point turns into a wrong filing, if nobody checks the reconciliation. Read the NTD reporting guide for the complete picture of what every reporter type has to file and where each figure originates. Or talk to us about your GTFS if the feed itself needs work before any of this math is worth running. Once the data is filed, peer benchmarking with NTD data covers what to do with everyone else’s.