Time to First Byte Calculator for TTFB

July 16, 2026

Time to First Byte Calculator

Estimate TTFB from DNS lookup, TCP connect, TLS handshake, redirects, CDN edge hits, origin distance, backend query time, cache generation time, and server processing.

⚙TTFB scenario presets
⏱First-byte timing inputs
Resolver, cache state, and authoritative lookup time.
Usually close to one round trip to the selected endpoint.
Use 0 for HTTP or reused connections; use observed handshake for fresh HTTPS.
Application routing, framework overhead, auth, and response setup.
Percent of requests served from edge without full origin work.
Round-trip penalty between edge or client and origin.
Database, search, storage, API calls, or service dependencies.
HTML render, object serialization, or edge fill work on misses.
HTTP to HTTPS, www, locale, slash, or auth redirects before first byte.
Extra request/response round trip per redirect.
Common targets are 100 to 200 ms for fast dynamic pages.
This is a time-to-first-byte calculator. It stops at the first byte of the main HTML or API response and does not model image downloads, CSS, JavaScript execution, LCP, or full page load time.
Total TTFB
0 ms
first byte estimate
Server vs Network
0% / 0%
weighted server share / network share
Target Gap
0 ms
difference from target TTFB
Cache Impact
0 ms
average first-byte time avoided by CDN hits

TTFB breakdown

📊Live TTFB readout
0 ms
Network Path
0 ms
Server Work
0 ms
Origin Miss Path
0 ms
Edge Hit Path
🧭TTFB latency reference table
TTFB rangeSignalLikely user impactFirst check
Under 100 msExcellentFirst byte feels immediateKeep cache and connection reuse healthy
100 to 200 msFastStrong target for dynamic HTMLWatch backend p95 and regional routing
200 to 500 msAcceptable but visiblePage start can feel delayed on repeat visitsSplit network and server shares
500 to 1000 msSlowUsers wait before rendering can beginCheck redirects, origin distance, and DB
Over 1000 msPoorOften perceived as a stalled requestTreat as server, routing, or cold-start incident
🌐Network component reference
ComponentGood rangeCommon high causeTTFB tuning move
DNS lookup5 to 40 ms cached, 40 to 120 ms coldResolver distance or uncached delegationUse reliable DNS, reduce CNAME chain depth
TCP connect10 to 100 msUser is far from edge or originMove traffic to closer edge or region
TLS handshake0 to 150 msNo session reuse, old TLS stack, distant serverEnable TLS 1.3, HTTP/2 or HTTP/3, session resumption
Redirects0 redirects preferredHTTP to HTTPS plus www plus locale chainsCollapse redirects into one canonical response
Origin distance5 to 80 ms regionalCDN miss travels across continentsUse origin shield, closer region, or edge compute
🖥Server component reference
Server componentGood rangeWarning signPractical fix
Application processing20 to 120 msFramework boot, auth, plugin hooks, queueingProfile route handlers and remove blocking work
Backend query time5 to 80 msSlow SQL, search, storage, or external API callsAdd indexes, batch queries, cache repeated lookups
Cache generation5 to 100 msExpensive HTML render or serialization on missesPrewarm, fragment cache, or stale-while-revalidate
Cold start0 ms when warmServerless or container boot delayKeep warm, reduce bundle size, use provisioned capacity
Origin queueingNear 0 msCPU, PHP-FPM, worker, or DB pool saturationAdd workers carefully and fix the bottleneck first
📦Hosting and CDN comparison grid
Platform patternTypical TTFB strengthTypical TTFB riskBest fitImprovement lever
Static CDN edgeVery low network and server time on hitsOrigin fill can still be slowStatic sites, cached docs, images, downloadsLong TTL, hashed assets, prewarm popular URLs
Shared hostingSimple setup and low costNoisy neighbors, slow PHP, limited cache controlSmall WordPress or low traffic sitesPage cache, object cache, fewer plugins
VPS reverse proxyPredictable when tunedRegion may be far from usersHome server blog, forums, dashboardsNginx cache, PHP-FPM tuning, closer VPS region
Managed WordPressBuilt-in page and object cacheDynamic pages and plugin hooks can dominateContent sites with editorial workflowEdge cache HTML, database cleanup, plugin audit
Serverless functionsScales without server managementCold starts and region mismatchBurst APIs and light SSRWarm paths, smaller bundles, regional deployment
Edge computeClose to users for personalized first byteOrigin reads can erase the edge benefitAuth gates, redirects, A/B routing, light personalizationKeep data at edge, avoid blocking origin fetches
Home lab originExcellent for LAN usersResidential upload, ISP routing, TLS terminationPrivate dashboards and self-hosted toolsTunnel or CDN proxy, local DNS, reverse proxy cache
🔍TTFB-only comparison
TTFBMeasures time until the first byte of the main response arrives. It includes DNS, connection setup, redirects, network travel, and server readiness.
Server response timeOften means only application and origin work. This calculator separates it from DNS, TCP, TLS, redirects, and distance.
Full page loadIncludes assets, render blocking CSS, JavaScript, images, fonts, and browser work. Those are outside this calculator.
Cache impactShows how much average first-byte time a CDN or page cache avoids by shifting requests from origin misses to edge hits.
💡TTFB tuning tips
Start by removing redirect chains. Each redirect can repeat connection and request latency before the final response can produce a first byte.
Split cache hits from misses. A great average can hide painful origin misses. Track edge-hit TTFB and miss-path TTFB separately.
Do not blame frontend assets for high TTFB. Slow images and JavaScript hurt page load, but they happen after the first byte. TTFB starts with routing, connection setup, and server readiness.
Use the server versus network share. If network dominates, move closer or improve CDN routing. If server dominates, profile queries, cache generation, worker queues, and cold starts.

When you’re trying to make a slow site fast, you tend to pull up Chrome DevTools. Then you spend some time tweaking image sizes or reducing your JavaScript bundle size. Squeeze, squeeze, squeeeeze. But your big content won’t load for another two seconds!

That’s the time to first byte, or TTFB. And it has little to do with how much space the files takes up on the disk. Instead, it’s about what happens behind-the-scenes: that invisible handshake between server and browser. This calculator will do the math for you. All you have to do is input your backend, TLS, TCP, and DNS times. No need to guess at conversions or coefficients.

What Is TTFB and Why It Matters

For many, TTFB represents nothing but a measurement of their web host’s responsiveness. This isn’t true. TTFB include all the little delays from when you type a URL into your browser until the first character of HTML appear on your screen.

First, there’s DNS resolution, when the browser attempt to look up the IP address. If this take long, nothing else will start happening. Next comes the TLS handshake and TCP connection. These could takes more than a hundred milliseconds depending on server’s location, its power, or any misconfigurations. All of this happens even before any of your application code has executed.

So how do you separate good performance from bad? That’s where the reference table on that page come into play. If you’re seeing something like two-hundred- to five-hundred-millisecond delays, then it’s going to be a mixed problem. Is it the server, or your network path? For a static site served up from a nearby edge node, there is very little server time involved. But you could still have issues if user’s mobile connection is high latency. On the flip side, you might have a powerful local server that processes thing fast, but with poor routing for users in other parts of the world.

That’s where cache comes into play. When using a content delivery network, requests gets served from cache and never reach origin server. So the time it takes to query the backend doesn’t matter on that particular request. The tool factors in edge hits versus misses. It uses misses as a way to model that effect. The lower the cache hit rate, the higher cost for each visitor… All the way back to downloading data and building an HTML page. That adds up quickly. When you have thousands of visitors, even a couple milliseconds longer per miss can slow down what would of been a blazing fast page.

Another major source of delay comes from redirects. Three hops means three round trips to get there, one for each redirect. They all incur the same amount of overhead: DNS and connection. It sounds trivial, but at scale, they suck away your performance budget. When possible, eliminate them and make request go straight where it needs to be.

Serverless cold starts has a similar problem. If your function is spun up from scratch, that initialization time contribute toward your TTFB. Reducing your bundle size helps. Keeping things warm also helps. However, you’ll still pay a latency tax while waiting for the container to become available.

Nobody wants zero milliseconds. That’s never going to happen over public networks. You want something fast enough to feel responsive, which is typicaly less than 200 milliseconds. If you’re often above that number, start figuring out where your time being spent. Is it waiting on the database? Are you waiting for data to travel around the world and hit an origin server? Until you figure out what the bottleneck is, all you’ll do is add some random caching layer, fixing the wrong problem.

Optimizing for TTFB respects the user’s attention span. People don’t care how many CDNs you use, nor do they care about your server specs. They just want the damn page to load. If you know what impacts that initial byte then you’ll stop optimizing for assets and start fixing the underlying delays that block rendering completely. Almost never are these delays related to file size. Knowing that difference will help create an actualy fast web.

Time to First Byte Calculator for TTFB

Related posts

Leave a Comment