How to Build a Performance Budget for a Website is an important process for developers, designers, SEO professionals, and website owners who want to keep websites fast and reliable. A performance budget defines measurable limits for resources such as JavaScript, CSS, images, fonts, page weight, network requests, and loading times.
Instead of waiting for a website to become slow and then trying to fix it, you can establish performance targets before development begins. These targets help your team understand how much performance cost a new feature, image, script, plugin, or third-party service can introduce.
Learning How to Build a Performance Budget for a Website also makes performance optimization easier to manage. Rather than simply saying that a website should be “fast,” you can establish measurable requirements such as a maximum page size of 2 MB, a JavaScript limit of 300 KB, or an LCP target of 2.5 seconds.
This guide explains How to Build a Performance Budget for a Website step by step and shows beginners how to measure performance, set realistic limits, optimize different resources, monitor Core Web Vitals, and maintain a performance budget over time.
What Is a Website Performance Budget?
A website performance budget is a collection of limits that defines how much performance-related cost a webpage is allowed to have.
A budget can control technical resources and user-focused performance metrics, including:
- Total page weight
- HTML size
- CSS size
- JavaScript size
- Image size
- Font size
- Number of network requests
- Third-party scripts
- LCP
- INP
- CLS
- Server response time
For example, a basic performance budget could look like this:
| Metric | Example Budget |
|---|---|
| Total page weight | ≤ 2 MB |
| JavaScript | ≤ 300 KB |
| CSS | ≤ 150 KB |
| Images | ≤ 1 MB |
| Fonts | ≤ 200 KB |
| Requests | ≤ 75 |
| LCP | ≤ 2.5 seconds |
| INP | ≤ 200 ms |
| CLS | ≤ 0.1 |
These values are examples rather than universal requirements. Your website may need different limits depending on its purpose, audience, functionality, traffic, and content.
The main goal of How to Build a Performance Budget for a Website is to establish measurable limits that developers can monitor throughout the website lifecycle.
Why Is a Performance Budget Important?
Website performance directly affects how visitors experience a website.
A slow page can make users wait before they can read content, interact with buttons, view products, complete forms, or make purchases. Performance problems can become particularly noticeable on mobile devices and slower networks.
Without a performance budget, websites often become slower gradually.
A development team may add:
- A JavaScript library
- A tracking script
- A large hero image
- Additional web fonts
- A video
- A chat widget
- Analytics software
- Advertising scripts
- Social media integrations
- New WordPress plugins
Each addition may appear harmless individually. However, dozens of additions can significantly increase page weight and browser processing requirements.
A performance budget creates a simple rule:
Every new feature should provide enough value to justify its performance cost.
This is why How to Build a Performance Budget for a Website should be considered part of the development process rather than something reserved for the final optimization stage.
What Should a Performance Budget Measure?
Before learning How to Build a Performance Budget for a Website, you need to decide what your team will measure.
A good budget normally combines three categories: resource metrics, loading metrics, and user-experience metrics.
Resource Metrics
Resource metrics show how much the browser needs to download.
Common examples include:
- HTML
- CSS
- JavaScript
- Images
- Fonts
- Video
- Third-party scripts
- Total transferred bytes
- Number of requests
Loading Metrics
Loading metrics help you understand how quickly content becomes available.
Examples include:
- First Contentful Paint (FCP)
- Largest Contentful Paint (LCP)
- Time to First Byte (TTFB)
User Experience Metrics
Modern websites should also monitor Core Web Vitals.
The main Core Web Vitals are:
- LCP: Measures loading performance.
- INP: Measures responsiveness to user interactions.
- CLS: Measures visual stability.
You can learn more about website performance testing with Google PageSpeed Insights.
How to Build a Performance Budget for a Website: 7 Steps
Step 1: Define Your Performance Goals
The first step in How to Build a Performance Budget for a Website is deciding what performance means for your project.
Not every website has the same requirements.
For example, an e-commerce website may prioritize:
- Fast product pages
- Quick product image loading
- Responsive filters
- Fast cart interactions
- Quick checkout
A content website may prioritize:
- Fast article loading
- Lightweight images
- Fast text rendering
- Minimal advertising impact
A web application may prioritize:
- JavaScript execution
- Interaction responsiveness
- API response times
- Application startup time
Start by identifying your most important pages and user journeys.
Ask:
- Which pages receive the most traffic?
- Which pages generate revenue?
- Which pages are most important for SEO?
- Which pages contain the most JavaScript?
- Which pages have the largest images?
- Which user actions must feel instant?
- Which devices do visitors commonly use?
Your answers will help you create a realistic performance target.
Step 2: Measure Your Current Website
The second step in How to Build a Performance Budget for a Website is measuring your existing website.
You should establish a baseline before deciding how much improvement is required.
Test several representative pages instead of testing only your homepage.
For example:
Homepage
Product page
Category page
Blog article
Landing page
Contact page
Checkout page
Useful performance testing tools include:
- PageSpeed Insights
- Lighthouse
- Chrome DevTools
- WebPageTest
- Real User Monitoring platforms
You can also use Lighthouse directly through Chrome DevTools. The official documentation is available at Chrome Lighthouse documentation.
Record your current results.
For example:
Total Page Weight: 3.8 MB
JavaScript: 750 KB
CSS: 190 KB
Images: 2.1 MB
Fonts: 280 KB
Requests: 110
LCP: 3.6 seconds
INP: 270 ms
CLS: 0.18
This baseline gives you evidence for your future budget.
Step 3: Identify the Biggest Performance Problems
Once you have measured the website, identify the resources consuming the most bandwidth or processing time.
For example:
Images → 2.1 MB
JavaScript → 750 KB
Fonts → 280 KB
CSS → 190 KB
HTML → 100 KB
Other → 380 KB
In this example, images are the largest contributor.
That means image optimization may provide more benefit than spending hours reducing a small CSS file.
Common performance problems include:
- Oversized images
- Unused JavaScript
- Large JavaScript frameworks
- Too many fonts
- Excessive third-party scripts
- Render-blocking resources
- Large CSS files
- Video embeds
- Poor caching
- Slow server response times
When learning How to Build a Performance Budget for a Website, always prioritize the largest performance costs first.
Step 4: Set Realistic Performance Limits
Now you can create your performance budget.
A sample website budget could be:
| Resource | Maximum Target |
|---|---|
| Total page weight | 2 MB |
| HTML | 100 KB |
| CSS | 150 KB |
| JavaScript | 300 KB |
| Images | 1 MB |
| Fonts | 200 KB |
| Requests | 75 |
| LCP | 2.5 seconds |
| INP | 200 ms |
| CLS | 0.1 |
These values are starting points, not strict requirements for every website.
Suppose your current website is 5 MB.
Trying to reduce it immediately to 1 MB might be unrealistic. Instead, use progressive targets:
Current: 5 MB
Phase 1: 4 MB
Phase 2: 3 MB
Phase 3: 2.5 MB
Final target: 2 MB
This makes How to Build a Performance Budget for a Website practical for existing websites as well as new projects.
Step 5: Create Page-Specific Budgets
Different pages can have different performance requirements.
A blog article may not need the same budget as an interactive dashboard.
For example:
Blog Page
Page Weight: ≤ 1.5 MB
JavaScript: ≤ 200 KB
Requests: ≤ 60
E-Commerce Product Page
Page Weight: ≤ 2.5 MB
JavaScript: ≤ 350 KB
Images: ≤ 1.2 MB
Web Application
JavaScript: ≤ 500 KB
LCP: ≤ 2.5 seconds
INP: ≤ 200 ms
Page-specific budgets can be useful when different sections of a website have very different functionality.
However, do not create dozens of separate budgets. Too many rules can make performance management difficult.
Use a small number of meaningful categories.
Step 6: Add the Budget to Your Development Workflow
A performance budget is useful only when developers actually follow it.
Document your limits somewhere accessible to your team.
For example:
Website Performance Budget
Total Page Weight: 2 MB
JavaScript: 300 KB
CSS: 150 KB
Images: 1 MB
Fonts: 200 KB
Requests: 75
LCP: ≤ 2.5 seconds
INP: ≤ 200 ms
CLS: ≤ 0.1
Then include performance testing throughout development.
Test after:
- Major feature releases
- Website redesigns
- Theme changes
- Plugin installations
- JavaScript changes
- Image changes
- Analytics integrations
- New advertising scripts
- Third-party integrations
Performance testing should not happen only before launch.
For technical teams, performance checks can also be integrated into CI/CD pipelines.
Step 7: Monitor and Update the Budget
The final step in How to Build a Performance Budget for a Website is continuous monitoring.
Websites change over time.
A developer may add a new library. A designer may upload a larger image. A marketing team may add a new tracking script.
Individually, these changes may appear small.
Over several months, however, they can push the website far beyond its original performance budget.
Review performance after major releases and periodically compare current measurements against your targets.
If business requirements change, update the budget intentionally.
Do not allow the budget to grow simply because the website has become slower.
How to Build a Performance Budget for Images
Images are often one of the largest contributors to page weight.
When creating an image budget, consider:
- File format
- Dimensions
- Compression
- Responsive images
- Lazy loading
- Image quality
- Delivery method
Modern formats such as WebP and AVIF can reduce file sizes when used appropriately.
You should also avoid uploading images that are significantly larger than the dimensions required by the page.
For example, if an image is displayed at 800 × 600 pixels, uploading a 5000-pixel-wide original may unnecessarily increase page weight.
Use responsive image techniques so that smaller devices can receive appropriately sized images.
A simple image rule might be:
Maximum image contribution per page: 1 MB
Hero image: ≤ 300 KB
Individual content image: ≤ 150 KB
These numbers are examples and should be adapted to your website.
How to Build a Performance Budget for JavaScript
JavaScript can affect both download size and browser processing.
A large JavaScript bundle may require more time to download, parse, compile, and execute.
When creating a JavaScript budget, consider:
- Minification
- Tree shaking
- Code splitting
- Lazy loading
- Removing unused dependencies
- Reducing third-party scripts
- Deferring non-critical code
For example, an interactive feature that is used only on a checkout page does not necessarily need to be loaded on every blog article.
Loading JavaScript only where it is required can significantly improve efficiency.
If a new dependency adds 200 KB to your JavaScript bundle, the team should understand why the dependency is necessary and whether there is a smaller alternative.
How to Build a Performance Budget for CSS
CSS contributes to page weight and browser processing.
Large or duplicated stylesheets can increase unnecessary work.
To maintain a CSS budget:
- Remove unused CSS.
- Minify stylesheets.
- Reduce duplicated rules.
- Avoid unnecessary frameworks.
- Split CSS where appropriate.
- Load critical styles efficiently.
Be careful with automated unused-CSS removal because some styles may only appear after interactions such as opening menus, modals, or tabs.
A CSS budget should reduce unnecessary code without breaking the interface.
How to Build a Performance Budget for Fonts
Fonts are another resource that can quietly increase page weight.
A website may load multiple:
- Font families
- Font weights
- Styles
- Language subsets
- Variable font files
For example, loading seven font weights when only two are actually used creates unnecessary network traffic.
A simple font budget could specify:
Font families: 1–2
Font weights: 2–4
Total font weight: ≤ 200 KB
Again, these are example targets.
Use only the fonts and weights your design actually needs.
How to Build a Performance Budget for Third-Party Scripts
Third-party scripts deserve special attention.
Examples include:
- Google Analytics
- Advertising platforms
- Chat widgets
- Heatmaps
- Social media widgets
- Customer support software
- A/B testing tools
- Marketing automation
Third-party resources can add JavaScript, network requests, and processing work that your team does not fully control.
Before adding a third-party script, ask:
- Is it necessary?
- What business value does it provide?
- How much JavaScript does it add?
- Can it load after critical content?
- Is there a lighter alternative?
- Can it be removed if it is no longer useful?
This makes How to Build a Performance Budget for a Website especially valuable for marketing-heavy websites.
How Core Web Vitals Fit Into a Performance Budget
Core Web Vitals help connect technical performance with actual user experience.
Largest Contentful Paint
LCP measures the rendering time of the largest visible content element.
A commonly used good threshold is 2.5 seconds or less.
LCP can be affected by:
- Slow server response
- Large images
- Render-blocking resources
- Poor resource prioritization
- Slow fonts
Interaction to Next Paint
INP measures how responsive a page is when users interact with it.
A good target is generally 200 milliseconds or less.
Heavy JavaScript execution can increase interaction delays.
Cumulative Layout Shift
CLS measures unexpected visual movement.
A good target is generally 0.1 or less.
Common causes include:
- Images without dimensions
- Dynamically inserted content
- Ads without reserved space
- Fonts causing layout changes
For the latest Core Web Vitals guidance, see Google Search Central’s Core Web Vitals documentation.
How to Enforce a Performance Budget
Creating a budget is only the beginning.
The next challenge is enforcement.
Use Automated Testing
Run Lighthouse or another performance testing system regularly.
Automated testing helps detect regressions early.
Monitor Bundle Sizes
Modern development tools can report JavaScript and CSS bundle sizes.
For example:
JavaScript Budget: 300 KB
Actual Bundle: 385 KB
Status: Budget Exceeded
This gives developers an opportunity to optimize before deployment.
Use CI/CD Checks
Development teams can add performance checks to their deployment pipeline.
A build can be flagged when a JavaScript bundle, CSS file, or other resource exceeds a predefined threshold.
Review Performance During Code Reviews
Performance should also be considered during code reviews.
When a developer introduces a new dependency, ask:
- What problem does it solve?
- How large is it?
- Can the functionality be implemented without it?
- Does it affect every page?
- Can it be loaded only when needed?
This prevents performance problems from becoming technical debt.
Performance Budget Example for a Website
Here is a practical example of a performance budget for a content-focused website:
| Metric | Target |
|---|---|
| Total page weight | ≤ 2 MB |
| HTML | ≤ 100 KB |
| CSS | ≤ 150 KB |
| JavaScript | ≤ 300 KB |
| Images | ≤ 1 MB |
| Fonts | ≤ 200 KB |
| Network requests | ≤ 75 |
| LCP | ≤ 2.5 seconds |
| INP | ≤ 200 ms |
| CLS | ≤ 0.1 |
The budget should be reviewed against real user data.
If analytics show that most users are on slower mobile networks, you may decide to create stricter resource limits.
If your website has complex functionality that genuinely requires additional resources, the budget may need to be adjusted.
The key is to make the decision based on evidence rather than arbitrary numbers.
Common Performance Budget Mistakes
Setting Arbitrary Limits
Do not copy another website’s performance budget without understanding your own requirements.
A simple blog and an advanced web application have different needs.
Focusing Only on Page Size
A small webpage can still be slow.
JavaScript execution, server response time, rendering, and third-party resources can affect user experience.
Use a combination of resource and user-focused metrics.
Ignoring Mobile Devices
Always consider mobile users.
A website that feels fast on a powerful desktop computer may feel slow on an older smartphone or slower connection.
Forgetting Third-Party Scripts
Marketing and analytics scripts can consume significant resources.
Track them as part of your overall performance budget.
Creating a Budget and Never Monitoring It
A performance budget has no value if nobody checks it.
Add performance monitoring to your normal development workflow.
Making the Budget Too Strict
An unrealistic budget can make development unnecessarily difficult.
Set achievable targets and improve them gradually.
Best Practices for Building a Website Performance Budget
When applying How to Build a Performance Budget for a Website to a real project, follow these best practices:
- Start with real measurements.
- Prioritize high-traffic pages.
- Consider mobile users.
- Set measurable targets.
- Track JavaScript separately.
- Track images separately.
- Limit unnecessary fonts.
- Monitor third-party scripts.
- Measure Core Web Vitals.
- Use automated testing.
- Review performance after major releases.
- Document the budget clearly.
- Update the budget intentionally.
- Treat performance as part of development.
Performance Budget Checklist
Use this checklist when creating your performance budget:
- Identify important website pages
- Define performance goals
- Measure current website performance
- Record total page weight
- Measure JavaScript size
- Measure CSS size
- Measure image size
- Measure font usage
- Count network requests
- Measure LCP
- Measure INP
- Measure CLS
- Identify third-party resources
- Set realistic performance limits
- Document the budget
- Add automated testing
- Monitor performance after releases
- Review the budget regularly
Frequently Asked Questions
What is a performance budget?
A performance budget is a collection of measurable limits that defines how much performance cost a website can have. It can include page weight, JavaScript, CSS, images, fonts, requests, loading times, and Core Web Vitals.
Why should I create a performance budget?
A performance budget prevents gradual performance degradation. It gives developers measurable limits and makes it easier to identify performance regressions.
What should a website performance budget include?
A useful budget can include total page weight, JavaScript size, CSS size, image size, font size, network requests, LCP, INP, CLS, and third-party resources.
Is a 2 MB page size a good performance target?
Two megabytes can be a reasonable starting target for some websites, but it is not a universal requirement. Your budget should be based on your website’s content, functionality, users, and network conditions.
Should a performance budget focus on mobile users?
Yes. Mobile users may have slower networks and less powerful devices, so testing and budgeting for mobile performance is essential.
How often should I review a performance budget?
Review it after major releases, redesigns, infrastructure changes, and new third-party integrations. Regular reviews can also help prevent gradual performance degradation.
Can a performance budget improve SEO?
Performance is an important part of user experience and can relate to Google’s page experience systems. A performance budget helps teams consistently monitor technical performance rather than allowing speed problems to accumulate.
Conclusion
How to Build a Performance Budget for a Website is about turning website performance into measurable and manageable requirements. Instead of simply asking whether a website is fast, you can establish specific limits for page weight, JavaScript, CSS, images, fonts, network requests, and Core Web Vitals.
Start by measuring your current website and identifying its largest performance costs. Then create realistic limits based on your users, business requirements, content, devices, and network conditions.
Once the budget is defined, integrate it into the development workflow. Test important pages, monitor resource sizes, evaluate third-party scripts, and use automated performance checks to detect regressions.
Remember that performance is an ongoing process. New features, images, plugins, libraries, and marketing tools can gradually make a website heavier.
A good performance budget helps your team make better decisions before those problems reach production.
By consistently applying How to Build a Performance Budget for a Website, you can create websites that remain faster, more responsive, more stable, and easier to maintain as they grow.
The best performance budget is not necessarily the strictest one. It is the one that is measurable, realistic, monitored regularly, and aligned with the needs of your users.

