Malaysia Transit shows live bus arrival times for 13 bus services across Malaysia and, since 21 November 2026, records every bus with a live GPS feed to say how buses kept to their times. This paper explains exactly how both are worked out and how well they work, with every measurement behind them.
A live time answers one question: how many minutes until this bus reaches my stop? Since 21 November 2026 the answer comes from the bus's own position and the pace buses are really making, not from the timetable.
Every bus service on Malaysia Transit with live positions publishes them through data.gov.my's GTFS Realtime feeds (CC BY 4.0): Rapid KL's buses, the MRT feeder buses, Rapid Penang, and BAS.MY in Kota Bharu, Kangar, Alor Setar, Kuala Terengganu, Ipoh, Melaka, Johor Bahru, Seremban (two operators) and Kuching. Each bus's position comes about every 30 seconds, with the trip it is running. BAS.MY Kuantan has no live positions, so only its timetable is shown.
Each operator's GTFS timetable gives the routes, their stops, the line each trip follows and the timetabled times. Most feeds leave out how far along the line each stop is (shape_dist_traveled): Rapid KL and BAS.MY Kota Bharu, Ipoh, Alor Setar, Kuching and Seremban do, so the server works it out from the line itself.
For each bus coming to a stop, every time someone asks, the server takes five steps.
The bus is placed on its trip's route line, and so is each stop, in the order the trip calls at them, so a loop's repeated streets go to the right call. The bus is projected onto the line's segments, not just its points, so a sparse line with one point per stop still places it between two stops. The distance is measured along the line: a bus across a river, or on the far side of a loop, isn't counted as close. Only with no line at all does it fall back to the straight line × 1.4.
For each service the server keeps every bus's last 8 minutes of positions, fed by every fresh feed, and takes the median of the moving buses' average speeds, from at least 4 buses (their last 15 minutes in a quiet area). The bus's own 8-minute average counts for 30% when it has one. That pace already holds the traffic, the lights and the time of day, so nothing is added for rush hour. A drop in it counts once it has lasted (the median of the last 15 minutes' paces); a rise, at once (section 3). Until enough buses have been seen (just after a restart, early morning), it starts from the service's typical pace, measured (section 3).
The average contains the time buses stand at stops and lights, so between stops they drive at 1.5 times it, kept between 12 and 60 km/h, and each stop between the bus and the rider's adds 15 seconds, counted on the line. Measured, the pace buses really made was 0.74 times the 8-minute average with under 1 km to go, 1.2 times it with 2 to 12 km, and 1.6 times it beyond: driving faster, plus time at each stop, follows that.
A moving bus has carried on since its position was sent, so the age of that report is taken off, up to 3 minutes.
The server remembers where each bus was on its line, so a move it couldn't have made is held, and the minutes can't swing from one update to the next (section 4). The result is rounded to the nearest minute; under a minute shows as "Now".
A service gets its own pace scale and stop time only where they beat the shared ones clearly on data they weren't fitted to (fitted on the first half of the evening by time, checked on the second). Three did.
| Service | Pace between stops | Each stop | Why |
|---|---|---|---|
| All others (shared) | 1.5 × average | 15 s | Johor Bahru, Melaka, Seremban and Rapid KL did better on the shared values; Kota Bharu and Alor Setar gained under 0.2 minutes |
| BAS.MY Ipoh | 1.3 × average | 15 s | Its buses run nearer their average |
| BAS.MY Kuching | 2.1 × average | 50 s | Its buses stand longer at stops |
| MRT feeder | 2.1 × average | 30 s | Quick between stops |
| Trains | average as it is | none | 15 to 90 km/h; no measurements to split it by |
Kangar and Kuala Terengganu, measured after, keep the shared values: their own fits did 0.1 minute better and worse on the data held back.
Each service's average pace, stops included, minute by minute as the server measures it (Saturday 21 November 2026, 16:20 to 18:20). The server starts from these until it has measured the pace live.
Replayed minute by minute on the buses logged on 21 November 2026, the first version of the model still let times jump: 1 update in 20 by 5 minutes or more, and on the MRT feeders 1 in 7 (34 minutes, then 4, then 21). In over half of those the bus had moved under 500 m but was put on another pass of its line: a feeder that goes out and back on the same road, a loop that crosses itself. Others were GPS positions a kilometre off for one report.
About a quarter of the live buses logged were standing at their trip's first stop, and the old time counted down from the drive alone while they stood there. Now a bus is waiting when it is within 100 m of its first stop (or parked, within 40 m of one place for 90 s, within 400 m of it: terminals are bigger than a pole), not pulling away (under 8 km/h, or its reports not moving apart), and no more than 300 m along its trip. It shows "Not departed yet". What else it gets depends on how its service's buses keep to their timetabled departure:
| Service | Seen setting off | Median | Within 3 min | Departure time |
|---|
When buses waiting at the start of their trip really set off (first seen 150 m away), against their trip's timetabled departure, 21 November 2026, 16:20 to 18:40. A few in most services left 25 to 120 minutes before their trip's time: buses given the trip after the one they ran.
Kota Bharu's, Kangar's, Alor Setar's and Kuala Terengganu's feeds give a bus its next trip early, while it's parked along the route or driving to the trip's start. That Sunday before 06:00, all of Kota Bharu's live times were for trips timetabled to start 15 minutes or more later; Kangar's R12 at 04:46 showed "1 min" for a trip that left at 06:30. Such a bus is now "Not departed yet" until 15 minutes before its trip starts, unless it is going along the trip's line (200 m on over the last 4 minutes). Replayed on the same buses:
| Service | First buses, before | After | 06:47–08:04, before | After |
|---|---|---|---|---|
| BAS.MY Kota Bharu | 0% · 30.7 min | 65% · 3.2 min | 43% · 5.0 min | 43% · 4.7 min |
| BAS.MY Kangar | 7% · 31.1 min | 39% · 8.0 min | 48% · 4.7 min | 48% · 4.6 min |
| BAS.MY Alor Setar | 46% · 9.1 min | 54% · 3.3 min | 41% · 4.3 min | 42% · 4.5 min |
| BAS.MY Kuala Terengganu | 25% · 9.0 min | 27% · 8.1 min | 41% · 6.7 min | 42% · 5.5 min |
Within 2 minutes · mean miss. First buses 04:46 to 06:03, 22 November 2026.
About one live trip in seven (21 November 2026) has an id its timetable doesn't: Seremban numbers its trips its own way, Kuala Terengganu, Ipoh and Rapid KL run trips past their pattern's last, Causeway Link's Johor Bahru feed is on a newer timetable version than the one published, and the MRT feeders' trips aren't in their timetable at all. Those buses had no arrival times. Now each is matched to a trip of the same pattern (the same stops and line), else of the same route, whose line it's on (within 150 m) and whose timetable has a bus where it is closest to now. Its arrivals are timed along that line, and no departure time is taken from that trip's timetable, as it isn't the bus's own.
Measured on Saturday 21 November 2026, 16:20 to 18:10:
| Before | Now |
|---|---|
| Rush-hour factors on top of timetables. Rapid KL and the MRT feeders were timed from timetables that allow a median 18.6 and 17.1 km/h between stops, the same at every hour. From 16:00 to 19:00 every timetable-based time was × 1.3 and every distance-based time used 70% of the speed (× 1.43), weekends too; from 7:00 to 9:00, × 1.2 and × 1.33. | The pace buses are making now, which already includes traffic and the time of day. |
| BAS.MY's speed is always 0. Kota Bharu, Ipoh and Alor Setar fell back to a fixed 32 to 34 km/h, × 0.7 in the evening (22 km/h), plus up to 3 minutes for a bus standing still. | The measured pace of the service's moving buses. |
| Straight line × 1.4 for the feeds without distances along the line, rounded up. | The distance along the route line. |
| Timetables in whole minutes. Johor Bahru, Melaka, Kuching, Seremban, Kangar and Kuala Terengganu were timed from their timetables (× 1.3 in the evening). Seremban's give every stop the same minute; Johor Bahru's and Melaka's mostly do (74% and 62%). | No timetable minutes: distance and pace. |
| Buses waiting at their first stop counted down from the drive alone while they stood. | "Not departed yet", with the departure time where it holds. |
| Jumping minutes when a bus was put on another pass of its line. | Steady minutes (section 4). |
| No time at all for about one trip in seven. | Matched to a trip of the same stops and line. |
The old code and the current code were replayed on the same buses at the same moments (replay.mjs), against when each bus really reached its stop, found from its GPS track. Buses on their way, at moments from 17:15 to 18:01 on 21 November 2026, a stretch the pace settings weren't fitted on (Kangar and Kuala Terengganu 17:24 to 18:18, where nothing was fitted).
| Service | Speed, km/h moving / door to door | Before bias · miss · within 2 | Now bias · miss · within 2 | Change |
|---|
Bias: how much later than the bus the time said (minutes, median). Miss: mean absolute difference (minutes). Change: within 2 minutes, in percentage points. Rapid Penang's feed was down that day; Kuantan has no live positions. "Moving" is the buses' median speed between GPS reports while moving; "door to door" the timed buses' pace to their stop, stops included.
Further out the new times tend to be early (by 2 minutes at 15 to 25 minutes away, 6 at 25 to 45): buses that stand a long time on the way can't be foreseen, and early is the side that doesn't make a rider miss the bus.
| Service | Before | Now |
|---|
Mean miss · within 2 minutes. The apps show these buses as "Not departed yet"; the minutes order the list and drive Track this bus. Kuching's waits are the least predictable: a quarter under 10 minutes, a quarter over 41.
Monday 23 November 2026, 03:42 to 09:30, all 11 areas: 7,108 bus-and-stop pairs, times checked at 139,397 moments, with the code as it ran that morning (before the pace fix of section 3). Within 2 minutes, buses on their way:
| Service | First hour | 06:00–07:00 | 07:00–08:49 | Sunday 07:00–08:49 |
|---|---|---|---|---|
| BAS.MY Alor Setar | 48% | 50% | 47% | 46% |
| BAS.MY Ipoh | 44% | 44% | 45% | 59% |
| BAS.MY Johor Bahru | 57% | 63% | 50% | 61% |
| BAS.MY Kangar | 39%* | 47% | 43% | 49% |
| BAS.MY Kota Bharu | 29% | 42% | 51% | 44% |
| BAS.MY Kuala Terengganu | 21% | 44% | 41% | 42% |
| BAS.MY Kuching | 12% | 35% | 42% | 44% |
| BAS.MY Melaka | 44% | 45% | 50% | 59% |
| BAS.MY Seremban (B) | 76% | 79% | 54% | 84% |
| Rapid KL | 60% | 50% | 39% | 52% |
| Rapid Penang | 57% | 52% | 44% | feed down |
| MRT feeder | 55% | 54% | 51% | 59% |
| All | 48%* | 50% | 46% | 52% |
* Before 06:00. No pairs were picked 05:11 to 05:41, so five services' first hour starts at 05:41. Seremban (B): under 200 times each.
The weekday rush is traffic, route by route. Rapid KL's buses made 17.5 km/h door to door from 07:00 (28.4 on Sunday). Its 220, 400, 600, 640, 190 and 303, and Rapid Penang's 701, took 1.4 to 2.2 times as long as their times said; Rapid KL's 421, 750 and 173 were on time. Nothing replayed did better: the bus's own pace counting more, slower buses counted in, longer stops, each route's own pace, or every rush time stretched by 10% or 20% (Rapid KL 39% → 38% → 36%). So the model stays; its rush times run short, the side that doesn't make a rider miss the bus.
From 21 November 2026, Malaysia Transit records when every bus with a live GPS feed left its trip's first stop and when it reached each stop after it, with the timetabled time beside each. Those records give the "on time today" lines and bars on the stop popups, Departures and the trip history page.
The logs of 21 November 2026 (16:20 to 18:40, 12 services) were replayed through the recorder, and each stop time compared with an independent measure: the moment the bus's GPS track passed within 60 m of the stop.
| Service | Stops compared | Median difference | Within 30 s | Within 60 s |
|---|
The 2 seconds early is the 30 m before the stop. Most of the rest are passes the recorder missed. On the MRT feeders, nearly all loops (93% of their trips end at their first stop), that is still one stop time in five: the first thing to improve.
A bus is on time from 1 minute early to 5 minutes late, against its own trip's timetabled time at that stop. More than 1 minute early is early: a rider who came on time would have missed it. More than 5 minutes late is late.
The bar shows today's buses in proportion: green on time, amber early, red late. On Departures, grey is a timetabled departure no bus was seen running, and the faintest grey one not compared. A headline such as "13 of 16 on time" is green when at least half were on time, otherwise the colour of what most buses did.
A bus can only be held to a timetable that is its own. Each service was checked on its own.
| Service | Compared with | Why |
|---|---|---|
| BAS.MY Kota Bharu, Kangar, Alor Setar, Kuala Terengganu, Ipoh, Melaka, Seremban; MRT feeder | its own trip | Its buses run the trips they carry (85% of Johor Bahru's departures within 3 minutes of their trip's time, 78% of Kota Bharu's). |
| Rapid Penang | its own trip | Since its feed came back on 22 November 2026, its trip ids match the timetable's: of 91 departures, 89% left from 1 minute early to 5 late of their own trip's time. |
| BAS.MY Kuching | nearest departure | Its buses keep to the timetable but carry trip ids an hour or two off. Against the nearest timetabled departure of the same route, direction and first stop (within 30 minutes), 87% were on time; against their own ids, 42%. |
| BAS.MY Johor Bahru | its own trip, or the nearest departure for a trip hours off | J32's 8 morning runs on 22 November 2026 carried trips 2 to 15 hours off, yet each left within 3 minutes of a timetabled J32 departure. |
| Rapid KL | its usual times | Its live data doesn't say which departure each bus runs: under 1 in 10 left within 3 minutes of their own trip's time, most 2 hours or more away. On 22 November 2026, only 202 of its 494 departures were within 30 minutes of any timetabled departure of their route (a median 1.5 minutes after it). The trip history page shows that median in its colour but in a dashed outline, marked with an asterisk. |
Where the timetable can't be held to, the records themselves say what's usual. For Rapid KL, the MRT feeders and Rapid Penang, the server learns when buses actually leave each first stop and come to each stop.
Quiet hours. Each bus is compared with the usual time of its route, direction and stop nearest it, within 15 minutes: as usual from 1 minute earlier to 5 minutes later, later than usual or earlier than usual beyond that.
Busy hours. The minute a bus comes means little, so the gap after the route's bus before it counts: twice the usual gap or more (and beyond the usual spread) is later than usual, a long wait; a quarter of it or less is earlier, bunched right behind.
Not judged: hours with no fixed pattern or not recorded on enough days, the first bus of the busy hours, a bus far from any usual time. Never called on time or late: these aren't a timetable.
All in the middleware's scripts/eta-study/. The server measured was started locally and asked for every bus's minutes every minute, while every bus's position was logged every 20 seconds.
Check it yourself. The code named here (the arrival times, trip history and punctuality, and the arrival code as it ran before 21 November), the tools, their tests and the method notes can be downloaded at malaysiatransit.techmavie.digital/downloads/malaysia-transit-methods.zip, for review only (its LICENSE.md says what's allowed); the study's logs and the timetables they used at malaysiatransit.techmavie.digital/downloads/malaysia-transit-study-data.tar.xz, under CC BY 4.0. Its README says how to replay the evening of 21 November and what you should get. The weekday morning of 23 November (section 8) isn't in that download.
| Tool | What it does |
|---|---|
| collect.mjs | Logs every bus's position every 20 s, and follows (bus, stop ahead) pairs 2 to 30 stops ahead, asking the server for that bus's minutes every minute. |
| analyze.py | Finds when each bus really passed its stop, from its positions (within 60 m). |
| replay.mjs | Runs the logged buses through the server's own arrival code at the moments logged, with the clock set to each: the current code, or an older commit's. Checked against the servers themselves, the old code gave the old server's logged times to within a minute 96 to 100% of the time per service. |
| score.py · jumps.py | Set two replays side by side against when the buses really reached their stops; measure how far each minute's time moves off a steady countdown. |
| fit.py · per_service*.py | Fit the pace scale and stop time, shared and per service, on the first half of the evening by time; checked on the second. |
| service_pace.py · terminal.py | Measure each service's typical pace minute by minute, and compare first-stop departures with the timetable. |
| GTFS / GTFS Realtime | The open formats transit data is published in: timetables, routes and stops (GTFS), and live positions (GTFS Realtime). |
| Trip | One run of a route at a timetabled time, from its first stop to its last. |
| Route line | The path a trip follows on the map (its shape), along which distances are measured. |
| Pace | Average speed including the time standing at stops and lights. |
| Within 2 minutes | A live time that said the bus would come no more than 2 minutes before or after it really did. |
| Bias · mean miss | How much later than the bus a time said (median); how far off it was on average, either way. |
| Not departed yet | A bus still waiting at the start of its trip. |
| Usual times | When a route's buses really leave and come, learned from recent recorded days of the same kind. Never an official timetable. |
Live positions: data.gov.my, GTFS Realtime, Creative Commons Attribution 4.0 (CC BY 4.0). Timetables: each operator's GTFS, through data.gov.my and the operators.
Rapid KL and MRT feeder history before 21 November 2026: Gregory Ho Wai Son and Kelvin Ling Shyan Seng, Greater Kuala Lumpur Mobilities (GKLMOB), Khazanah Research Institute, 2025, krinstitute.org/publications/gklmob, Creative Commons Attribution 3.0 (CC BY 3.0).
Malaysia Transit is an independent app, not a government one, and isn't affiliated with or endorsed by any government entity or transit operator. Questions and corrections: hello@techmavie.digital.
Measurements: 21 and 22 November 2026. The live versions of this paper's explanations: malaysiatransit.techmavie.digital/arrival-times.html and /trip-history.html.