Subway segment times
How long trains take between each pair of stations in a row, every weekday since April 2021. The base for our slow zones.
- Rows
- 1,646,722
- Size
- 13.1 MB
- Covers
- Weekdays, April 2021 to yesterday
- Updated
- Nightly
- Source
- MTA subway GTFS-realtime feeds; station names from MTA GTFS
- License
- CC BY 4.0
https://data.transitlab.nyc/v1/subway_segment_times/year=YYYY/month=MM/YYYY-MM.parquetRows and size from catalog.json, 2026-10-06.
What a row is
Section titled “What a row is”One segment on one weekday. A segment is two stations in a row on a trip, in one direction, such as L03S → L05S (Union Sq to 3 Av on the L, southbound). Its time runs from the moment a train leaves the first station to the moment it leaves the second, so it includes the stop at the second station.
For each segment and day we take every train between 6:00 and 21:59 New York time and keep a trimmed mean: we drop the fastest and slowest 10% and average the rest. Single times move in steps of about 15 seconds, the rate the MTA’s feed refreshes, so the mean is steadier than the median.
History through 2026-10-02 comes from an archive of the MTA’s subway feeds; later days come from our own collector, which applies the same rules.
Query it
Section titled “Query it”-- One segment over time: E train, Jackson Hts-Roosevelt Av to Queens PlazaSELECT service_date, n_trips, round(mean_seconds) AS secondsFROM transitlab.subway_segment_timesWHERE a_stop = 'G14S' AND b_stop = 'G21S' AND service_date BETWEEN '2023-03-01' AND '2023-08-31'ORDER BY service_date;Each month is its own file, so you can also read one month straight from its URL:
SELECT a_station, b_station, avg(mean_seconds) AS secondsFROM 'https://data.transitlab.nyc/v1/subway_segment_times/year=2026/month=09/2026-09.parquet'GROUP BY ALLORDER BY seconds DESCLIMIT 10;Stop IDs are from the MTA’s subway GTFS: the first character is the line group, and N or S is the direction.
Columns
Section titled “Columns”service_datedateNew York date. Weekdays only.
a_stopvarcharGTFS stop ID the train leaves, with its direction (N or S), e.g. L03S.
b_stopvarcharThe next stop on the same trip, e.g. L05S.
a_stationvarcharName of the first station.
b_stationvarcharName of the next station.
route_idsvarcharRoutes that ran the segment that day, space-separated, e.g. N W.
n_tripsbigintTrains counted, 6:00 to 21:59 New York time. Days with fewer than 10 are left out.
mean_secondsdoubleTrimmed mean (10th to 90th percentile) of seconds from leaving a_stop to leaving b_stop. Includes the stop at b_stop.
median_secondsdoubleMedian of the same. Moves in steps of about 15 s, the feed's refresh rate.
Good to know
Section titled “Good to know”- Weekdays only. Weekends and late nights aren’t in the table.
- Some stops are timing points, not stations. The feed reports places like
R60(the 60 St tunnel) between stations; they have no station name. - A segment can change. Reroutes, skipped stops and reopened stations add or remove segments.
route_idsshows which routes ran it that day. - Days with fewer than 10 trains on a segment are left out.