Developer and Text Tools

How to Set a Web Performance Budget That Your Team Keeps

Set page weight and timing budgets that fit real mobile networks, understand Core Web Vitals thresholds, and enforce limits with Lighthouse budget.json.

Saizul Amin
Saizul Amin2 Nov 2026 · 3 min read
How to Set a Web Performance Budget That Your Team Keeps

How to Set a Web Performance Budget That Your Team Keeps

Websites rarely become slow in one step. A tracking script here, a bigger hero image there, a new UI library for one feature, and a year later the page is twice as heavy and nobody decided that. A performance budget is the guard rail: a set of limits agreed in advance and checked automatically. This guide explains how to choose sensible numbers and keep them, with the Web Performance Budget Calculator.

Three kinds of budget

  • Quantity budgets: kilobytes per resource type (HTML, CSS, JavaScript, images, fonts) and request counts. Easy to measure in every build.
  • Timing budgets: lab metrics such as Largest Contentful Paint or Total Blocking Time under a target.
  • Rule-based budgets: a minimum Lighthouse score, for example.

Quantity budgets are the most practical to enforce in a pull request; timing budgets reflect what users feel. Most teams use both.

Why size still matters on mobile

Networks are faster than they used to be, but latency, the round trip time, has not improved much, and many users are on congested or cellular connections. Every new connection needs DNS, TCP and TLS round trips before any data flows. TCP then starts slowly: the first round trip carries around 14 KB, the next about twice that, and so on. That is why the first 14 KB of HTML matter, and why a page of a megabyte takes several seconds on the slow 4G profile Lighthouse uses for mobile, even before the CPU has to parse it.

JavaScript costs twice: once to download and again to parse and execute on a phone's slower processor. A kilobyte of JavaScript is more expensive than a kilobyte of image.

Working back from a goal

Start with the experience you want, for example the main content visible within 3 seconds on a typical mobile connection. Using the network's bandwidth and round-trip time you can estimate how many bytes fit in that time over one new connection: on Lighthouse's mobile profile, roughly 450 to 470 KB. That is the budget for everything on the critical path: HTML, CSS, fonts and blocking JavaScript. Images below the fold and lazy-loaded code can come later.

Splitting the budget

A reasonable starting split for critical resources is about 10 % HTML, 15 % CSS, 50 % JavaScript and 25 % fonts, then a separate budget for images. Adjust to your site: a content site may spend more on fonts and images and less on JavaScript, an app the opposite. Add request count budgets too, especially for third-party resources, because each new host adds connection time.

Core Web Vitals as outcome targets

Google defines good thresholds at the 75th percentile of real visits: LCP up to 2.5 seconds, Interaction to Next Paint up to 200 milliseconds and Cumulative Layout Shift up to 0.1. Values above 4 seconds, 500 milliseconds and 0.25 are poor. Byte budgets are the inputs you control; vitals are the outcome you report. If byte budgets are met but LCP is still slow, look at server response time and render-blocking resources.

Measuring actual sizes

Use transferred, compressed sizes, as shown in the DevTools Network panel. A HAR file export is a convenient way to total sizes by type and to separate first-party from third-party requests. Measure the pages that matter most: home, a product or article page and checkout or sign-up.

Enforcing the budget

Write the budget into a Lighthouse budget.json and run Lighthouse with --budget-path, or add it to Lighthouse CI so every pull request is checked. Many bundlers can also fail a build when a bundle exceeds a size. Decide in advance what happens on a breach: the change is optimised, something else is removed, or the budget is raised consciously with a note explaining why.

Limits

Download estimates use a simplified single-connection model; real browsers download in parallel, reuse connections and caches, and spend time on CPU work that byte counts do not show. Budgets are a planning tool, so confirm results with lab tests and real-user data rather than relying on the estimates alone.

Completely freeNo cost, no sign-up
Files stay privateEverything runs in your browser
Easy in your languageAvailable in many languages