The formula
time = weight ÷ bandwidth + latency × rounds + handshake
Where it comes from
Weight divided by bandwidth explains only part of the time. The rest comes from latency, paid once per round trip: first the TCP and TLS handshake, three or four trips before the first byte, and then each round of requests. Without multiplexing the browser opens six connections, and with a hundred resources that is seventeen rounds: at fifty milliseconds of ping, nearly nine hundred milliseconds that have nothing to do with the size of anything.
How to work it out by hand
- Convert the weight to bits and divide by the speed in bits per second
- Add the initial handshake: about three round trips
- Add the request wait, in rounds if there is no multiplexing
- The sum is the time until the page is complete
What is worth knowing
The most useful decision for speeding up a site comes straight out of this: look at how much of the time is waiting and how much is downloading. If waiting dominates, slimming images fixes nothing and what needs cutting is the number of requests, or the distance to the server. If transfer dominates, then compressing and trimming is what shows. This sum is also deliberately optimistic: it assumes everything downloads in parallel and it does not count JavaScript execution or painting, which on a script-heavy modern page can be half the time the visitor actually experiences. Real browser metrics are the place for that.