Skip to main content

What is Total Blocking Time?

Total Blocking Time (TBT) is a lab metric that measures how long the browser’s main thread is blocked by long tasks after First Contentful Paint and therefore cannot respond to clicks, taps, or keyboard input. For every task that takes longer than 50 milliseconds, only the portion above those 50 milliseconds counts. A good Total Blocking Time is below 200 milliseconds; in Lighthouse, at 30 percent, it is the most heavily weighted metric of the performance score.

Total Blocking Time explained: TBT as the time the main thread is blocked by long JavaScript tasks, taismo SEO glossary

Term profile at a glance

Attribute Details
Part of speech Noun, English technical term, also used unchanged in German
Abbreviation TBT
Pronunciation ˈtəʊtl ˈblɒkɪŋ taɪm
Plain-language description total time the browser is blocked
Unit milliseconds (ms)
Good value below 200 ms, moderate in Lighthouse up to 600 ms, slow above 600 ms
Type of measurement lab metric, not a Core Web Vital
Weight in Lighthouse 30 percent of the performance score (from version 10)
Related terms Interaction to Next Paint, First Contentful Paint, long task, main thread, Core Web Vitals

How is Total Blocking Time calculated?

Total Blocking Time is the sum of the blocking time of all long tasks between First Contentful Paint and the point from which the page is reliably usable. A long task is any task on the main thread that takes more than 50 milliseconds. Its blocking time is its duration minus 50 milliseconds.

A worked example with 5 tasks shows the principle:

  • Task 1 takes 250 ms: 200 ms of it counts as blocking time.
  • Task 2 takes 90 ms: 40 ms of it counts.
  • Task 3 takes 35 ms: It is not a long task and does not count.
  • Task 4 takes 30 ms: It does not count either.
  • Task 5 takes 155 ms: 105 ms of it counts.

The tasks occupy the main thread for a total of 560 milliseconds, but the Total Blocking Time is 345 milliseconds. The calculation shows what matters: a single task of 250 milliseconds blocks more than five tasks of 50 milliseconds each, even though both use the same amount of computing time.

Worked example: how Total Blocking Time adds up from five tasksFive tasks on the main thread are shown as bars, with 250, 90, 35, 30, and 155 milliseconds. For each task, the part up to 50 milliseconds is dark and the part above it is marked orange. The orange parts are 200, 40, and 105 milliseconds; the two short tasks have no orange part. The sum is a Total Blocking Time of 345 milliseconds for a total run time of 560 milliseconds.Five tasks on the main thread, 345 ms Total Blocking TimeTask 1250 ms · 200 ms blockingTask 290 ms · 40 ms blockingTask 335 ms · does not countTask 430 ms · does not countTask 5155 ms · 105 ms blocking50 msup to 50 ms: does not countabove 50 ms: blocking timeTBT = 200 + 40 + 105 = 345 mstotal run time: 560 msFig. 1 · taismo
Fig. 1: Worked example of Total Blocking Time. Of five tasks with 560 milliseconds of run time, only the portions above 50 milliseconds count, 345 milliseconds in total.

Why is the threshold 50 milliseconds?

The 50-millisecond threshold comes from Google’s RAIL model, according to which a response within 100 milliseconds feels instant. If a task is finished after 50 milliseconds at the latest, the browser has enough time left to process an input and display the result before the 100 milliseconds have passed.

If a long task is running, on the other hand, the input has to wait. If a visitor clicks a button in the middle of a 250-millisecond task, nothing happens for them for more than 100 milliseconds. They click again, think the page is broken, or leave it. Total Blocking Time sums up exactly this waiting time.

What is a good TBT score?

A good TBT score is below 200 milliseconds, measured on an average mobile device. Lighthouse rates Total Blocking Time in the mobile test in 3 levels:

  • Fast: Up to 200 milliseconds.
  • Moderate: Above 200 up to 600 milliseconds.
  • Slow: Above 600 milliseconds.
Lighthouse rating scale for Total Blocking TimeA scale from 0 to 800 milliseconds is divided into three ranges: fast up to 200 milliseconds, moderate above 200 up to 600 milliseconds, and slow above 600 milliseconds. The values apply to the Lighthouse mobile test.How Lighthouse rates Total Blocking Time (mobile)FastModerateSlow0 ms200 ms400 ms600 ms800 msup to 200 msabove 200 up to 600 msabove 600 msTBT accounts for 30 percent of the Lighthouse performance score, more than any other metric.Fig. 2 · taismo
Fig. 2: The rating scale for Total Blocking Time in the Lighthouse mobile test. Up to 200 milliseconds is fast.

In Lighthouse from version 10 onward, Total Blocking Time contributes the most to the performance score at 30 percent, more than Largest Contentful Paint and Cumulative Layout Shift at 25 percent each. If you want to improve a poor Lighthouse score, Total Blocking Time is therefore often the biggest lever. For the mobile test, Lighthouse simulates a CPU that is four times slower, so values on fast computers are often much better than on real smartphones.

What is the difference between Total Blocking Time and Interaction to Next Paint?

Total Blocking Time measures in the lab how much long tasks block the browser during loading; Interaction to Next Paint measures for real visitors how quickly the page actually responds to their input. Both describe the same problem from two angles.

  • Type of measurement: TBT comes from a lab test without real users, INP comes from field data of real page views.
  • Time frame: TBT looks at the loading phase, INP at all interactions during the entire visit.
  • Status: Since March 12, 2024, INP has been one of the three Core Web Vitals, replacing First Input Delay. TBT is not a Core Web Vital.

Because nobody clicks in the lab, Total Blocking Time serves there as a stand-in for responsiveness. A high TBT is a strong warning sign of a poor INP but does not guarantee one, and a low TBT does not rule out slow responses after loading.

What causes a high Total Blocking Time?

A high Total Blocking Time is almost always caused by JavaScript that executes too much at once on the main thread during loading. There are 5 typical causes:

  1. Large JavaScript bundles: A single bundle with the code for all pages has to be fully loaded, parsed, and executed, even if the current page only needs a fraction of it.
  2. Third-party scripts: Tag managers, chat widgets, advertising and testing tools, embedded videos, and maps bring their own JavaScript, which you can hardly control.
  3. Hydration of JavaScript frameworks: Pages built with React, Vue, or similar frameworks are “brought to life” in the browser after loading, which creates long tasks.
  4. Plugins and extensions: In content management systems such as WordPress, each plugin often loads its own scripts on every page, even where its function does not appear at all.
  5. Heavy work on the page layout: Scripts that create, change, or measure many elements at the same time force the browser to recalculate the layout repeatedly.

The entry on JavaScript SEO describes how search engines handle JavaScript-heavy pages. If the server already delivers the content ready-made, for example via server-side rendering, the browser at least does not have to generate the content itself.

How do you measure Total Blocking Time?

You measure Total Blocking Time with lab tests, because it can only be calculated meaningfully under fixed conditions and without real input. Three tools are common:

  • Lighthouse: The report shows TBT in the performance section and lists the scripts with the longest execution time in the diagnostics.
  • PageSpeed Insights: The lab test in the lower part of the report uses Lighthouse and shows TBT separately for mobile and desktop devices.
  • Chrome DevTools: In the Performance panel, the recording marks every long task with a red corner. This lets you see which script is blocking at which point in time.

Long tasks can also be captured directly in the browser via the Long Tasks API. The following code prints every long task with its duration to the console, as long as it is loaded early in the head of the page:

new PerformanceObserver((list) => {
  for (const task of list.getEntries()) {
    console.log('Long Task:', Math.round(task.duration), 'ms');
  }
}).observe({ type: 'longtask' });

How do you improve Total Blocking Time?

You improve Total Blocking Time by executing less JavaScript and splitting the rest into smaller tasks that free up the main thread in between. The most effective measures are:

  • Remove unused JavaScript: Lighthouse shows which code is loaded on a page but not needed. Plugins and scripts without a purpose are dropped entirely.
  • Split the code: With code splitting, each page only loads the JavaScript it actually needs.
  • Defer scripts: Non-critical JavaScript gets defer or is only loaded after the page has loaded or on the first interaction.
  • Tame third parties: Embedded videos, maps, and chat widgets only load when a visitor needs them, for example via lazy loading or a preview image with a click.
  • Break up long tasks: Computationally intensive code frees up the main thread at intervals, for example with scheduler.yield() or setTimeout(). The browser can process input in between.
  • Offload work: Calculations that do not need access to the page run in a web worker, meaning outside the main thread.

Which scripts cause the most blocking time on a given website is shown by evaluating Lighthouse and a performance recording, as is part of an SEO audit.

Frequently asked questions about Total Blocking Time

Is Total Blocking Time a ranking factor?
Total Blocking Time is not a ranking factor, because for page experience Google only evaluates field data of the Core Web Vitals. It still has an indirect effect, because a high TBT often goes hand in hand with a poor Interaction to Next Paint.

Why does Total Blocking Time fluctuate between two tests?
Total Blocking Time fluctuates because third-party scripts, ads, and the load on the test machine turn out differently on every run. The average of several tests is therefore meaningful, not a single value.

Can Total Blocking Time be zero?
Total Blocking Time can be zero if no task takes longer than 50 milliseconds after First Contentful Paint. This is mainly achieved on lean pages with little JavaScript.

0%
Get insider knowledge first!
taismo Logo

© taismo GmbH

Address


Weißenfelder Str. 6
85551 Kirchheim near Munich, Germany