Total blocking time

Total blocking time (TBT) is a lab metric for how unresponsive a page is while it loads. Any task that occupies the browser's main thread for more than 50 milliseconds is a long task, and the time beyond 50 milliseconds is its blocking portion. TBT is the sum of those portions between first contentful paint and time to interactive.

The longer version

The main thread is where a browser runs a page's JavaScript and also where it deals with taps, clicks and key presses. web.dev explains that the thread counts as blocked during a long task because the browser cannot interrupt a task in progress, so input that arrives in the middle has to wait. Only the excess over 50 milliseconds is counted. Suppose four tasks run after the first content appears, lasting 120, 45, 70 and 300 milliseconds. The second is not a long task. The other three contribute 70, 20 and 250 milliseconds, so the total blocking time is 340 milliseconds, although the thread was busy for 535.

Counting starts at first contentful paint (FCP) and, in Lighthouse, stops at time to interactive (TTI). In web.dev's account, TTI treats a page as reliably interactive once the main thread has been free of long tasks for at least five seconds. Lighthouse's documentation now lists TTI itself among its retired metrics. For a target, web.dev says a site should aim for a total blocking time under 200 milliseconds when tested on average mobile hardware. Lighthouse colours a mobile result green up to 200 milliseconds, orange from 200 to 600 and red above 600, and on desktop draws the lines at 150 and 350. In the Lighthouse 10 performance score TBT carries a weight of 30 per cent, the largest of the five metrics.

TBT sits beside two other measurements. Largest contentful paint times the moment the main content is drawn, and a page can do well on it while scripts are still running, so the content is visible and a tap gets no answer. Interaction to next paint (INP) assesses how quickly a page responded to the interactions real users made, and is best measured in the field. A lab run of a page load usually contains no interactions, so web.dev treats TBT as a reasonable proxy for INP in the lab and not as a substitute for it. A long task that nobody interrupts costs users nothing, and a slow interaction after loading never shows up in TBT.

Lowering TBT means giving the main thread less to do while the page loads and breaking up what it still has to do. web.dev's guides cover optimising long tasks, reducing the impact of third-party code, reducing JavaScript execution time, minimising main-thread work, and keeping request counts low and transfer sizes small. In practice that means deferring scripts the first screen does not need, removing unused JavaScript, splitting bundles so code arrives when a route asks for it, yielding back to the browser inside long loops and moving heavy computation into a web worker, which runs off the main thread. Tag managers, chat widgets and analytics run on the same thread as the page's own code, so they are worth checking first. web.dev now advises optimising for INP over TBT, because INP is what real users feel.

Common questions

What is a good total blocking time?

A good total blocking time is under 200 milliseconds when the page is tested on average mobile hardware, according to web.dev. Lighthouse marks a mobile result between 200 and 600 milliseconds as moderate and one above 600 as slow, and uses 150 and 350 milliseconds as the boundaries on desktop.

How is total blocking time calculated?

Take every main-thread task longer than 50 milliseconds between first contentful paint and the end of the measurement, subtract 50 milliseconds from each, and add up what is left. A task of 70 milliseconds contributes 20, and a task of 40 contributes nothing.

What is the difference between total blocking time and interaction to next paint?

Total blocking time is a lab metric that adds up long-task time during page load, whether or not anyone interacted. Interaction to next paint is a Core Web Vital built on real interactions and best measured in the field, with 200 milliseconds or less counted as good. web.dev calls TBT a reasonable proxy for INP in the lab, not a substitute.

What is the difference between total blocking time and time to interactive?

Time to interactive is a single point: the moment from which the main thread has been free of long tasks for at least five seconds. Total blocking time is an amount: how much long-task time built up before that point. In web.dev's example, three tasks of 51 milliseconds spread over ten seconds can delay time to interactive as much as one ten-second task, yet the first case has a TBT of 3 milliseconds and the second 9,950.

How do you reduce total blocking time?

Reduce the amount of script the main thread has to run while the page loads, and break up what remains. web.dev's guidance is to optimise long tasks, limit the impact of third-party code, cut JavaScript execution time and minimise main-thread work. A Lighthouse report lists the specific opportunities it found on the page.

Is total blocking time a Core Web Vital?

Total blocking time is not a Core Web Vital. web.dev lists the Core Web Vitals as largest contentful paint, interaction to next paint and cumulative layout shift, and describes TBT as a lab-measurable proxy for INP that is left out of the set because it cannot be measured in the field.

What does TBT mean in SEO?

In SEO, TBT is the Lighthouse and PageSpeed Insights figure for how long scripts block the page during loading. The Core Web Vitals that Google publishes are measured on real visits, so TBT matters indirectly: a high value in the lab is an early sign of the interaction delays that INP records in the field.

Why does total blocking time change between Lighthouse runs?

Lighthouse times tasks on the machine that runs it, so a busy processor, browser extensions, the throttling method and third-party scripts that answer at different speeds all change how long each task takes. Running the test several times and reading the median, in a clean browser profile or from the command line, gives a steadier figure.

Bug reports that arrive ready to triage.

Collect replay, console, network and browser context with the Free plan.

<script src="…/widget.js" data-key="pb_pub_…">