How is it calculated?
TTFB adds up everything before the response begins: redirects, DNS lookup, connection and TLS setup, and the server’s work to produce the page.
Google’s TTFB guide treats 800 milliseconds or less as good and over 1,800 milliseconds as poor. Because LCP cannot happen before the first byte arrives, a slow TTFB makes a good LCP hard to reach.
Example
- 1.4 s to first byte
- 300 ms nearby
- 250 ms distant visitors
A page rendered on a server in one region takes 1.4 s to first byte for visitors on another continent and 300 ms nearby. Caching the HTML at the edge brings distant visitors to 250 ms, and their LCP improves by about the same second.
Common mistakes
- Treating it as pure server time. Redirects and connection setup are included.
- Measuring from your office next to the data centre. Look at it by country.
- Optimising images while TTFB is two seconds. Fix the first byte first.