I've noticed those apps are actually weirdly hit-or-miss sometimes, which tells you the algorithm isn't magic. They combine real-time data like current traffic patterns (pulling from Google Maps or similar services), the restaurant's historical prep times for different meal types, the driver's current location and speed, and distance to your address - then feed all that into machine learning models trained on thousands of completed orders to predict delays. The tricky part is that restaurants are the biggest variable; a busy Friday night pizza place takes way longer than a sushi spot on a Tuesday, so the apps track prep time by restaurant, time of day, and order complexity. Weather, driver behavior, and random accidents also factor in, which is why you'll sometimes see the ETA update as the driver progresses - the algorithm keeps recalculating based on new data rather than just using the initial estimate.