Set a performance budget before the build gets away from you
Choose a network and how fast you want the page to load, and the tool works out how many kilobytes the page can weigh. Three sliders then split that between JavaScript, images, and CSS with fonts.
Turning a load time into a page weight budget
The tool turns a target load time and a network speed into a page weight in kilobytes. Work through it once and you come out with numbers you can actually hand to a team, plus a sense of where the calculator's estimate and a real device will part company.
-
Set your target and network
Pick one of the three networks and set the load time you want, from half a second to five seconds.
-
Read the weight limit
See the page weight that load time allows, after 15% is set aside for the network's own overhead.
-
Turn the numbers into a working budget
Move the three sliders to share the budget between JavaScript, images, and CSS with fonts. Compare each figure with what your pages weigh now.
Performance Budget Calculator
Work backwards from a target load time to a page-weight budget, then split that budget across JavaScript, images and CSS with fonts. Pick a network, set your target, and adjust the three allocation sliders.
What is a performance budget? It is a byte ceiling you set in advance for a page, worked out from how long it should take to load on a given network, so that design and engineering decisions have a concrete number to check against instead of a vague sense of "too slow".
Formula: Time = Latency + Size ÷ Bandwidth. Rearranged: Size = (Time − Latency) × Bandwidth.
We then reserve roughly 15% for HTTP and TCP protocol overhead, so the usable budget shown below is 0.85 × that raw size.
Results
Bars below show each category's KB budget as a share of the largest total budget obtainable (fastest network, longest target time), so they move with how generous your actual budget is — not just with the slider split, which is already shown as the normalised share above.
Teaching note: a kilobyte of JavaScript costs more CPU time than a kilobyte of images, because it must be parsed, compiled and executed rather than just decoded. Keep JavaScript budgets tight even when the total budget looks generous.
Set a performance budget, then hold the build to it
The calculator turns a load time into a weight limit for JavaScript, images, and CSS with fonts. It suits anyone shipping to production, from a solo front-end developer to a team telling a client why a hero video needs to go.
No account needed, works on any device, free to use
Popular Tools
CSS Variable Architect
An interactive CSS Variable Architect, free to run in the browser. The companion guide sets out the method behind it, so you can check the working.
Tools / CSS Variable Architect
True-Contrast Smart Palette
An interactive True-Contrast Smart Palette, free to run in the browser. The companion guide sets out the method behind it, so you can check the working.
Tools / True-Contrast Smart Palette
CSS Unit Converter (px / rem / em / vw / vh)
An interactive CSS Unit Converter (px / rem / em / vw / vh), free to run in the browser. The companion guide sets out the method behind it, so you can check the working.
Tools / CSS Unit Converter (px / rem / em / vw / vh)
Aspect Ratio Calculator
An interactive Aspect Ratio Calculator, free to run in the browser. The companion guide sets out the method behind it, so you can check the working.
Tools / Aspect Ratio Calculator
CSS Grid Architect
An interactive CSS Grid Architect, free to run in the browser. The companion guide sets out the method behind it, so you can check the working.
Tools / CSS Grid Architect
CSS Specificity Calculator
An interactive CSS Specificity Calculator, free to run in the browser. The companion guide sets out the method behind it, so you can check the working.
Tools / CSS Specificity Calculator