You have spent three weeks optimising a client's platform to handle 50,000 concurrent users without crashing. Your developers rewrote the caching layer, implemented lazy loading across the entire front end, and built a custom database query optimiser that reduced page load times from 4.2 seconds to 0.8 seconds. That is real technical work. It solved a genuine problem. But does it qualify as R&D for tax purposes?
The answer is not straightforward. And it depends on whether you solved an uncertainty or simply applied known methods to a known problem.
This article explains where HMRC draws the line on performance optimisation r&d qualifying work. We will use real agency scenarios, reference the relevant legislation, and give you a framework for deciding whether your next optimisation project is worth discussing with your accountant.
What HMRC Actually Looks For in R&D Claims
HMRC's R&D definition comes from the Corporation Tax Act 2009, Part 13. For a project to qualify, it must meet two tests:
- An advance in science or technology, you created knowledge or capability that did not exist before, at least within your field.
- Overcoming technological uncertainty, you did not know at the start whether the outcome was achievable, or how to achieve it within reasonable time or cost constraints.
The work must also relate to your trade. If you are a digital agency, R&D work on a client's platform qualifies because it is part of your trade of delivering technical solutions.
Here is the critical point that most agency founders miss: routine performance optimisation is not R&D. Tweaking CSS to shave 200ms off a load time is not qualifying work. Neither is compressing images, enabling browser caching, or moving a database to a bigger server. Those are standard engineering tasks that any competent developer could do without uncertainty.
But if you had to invent a new approach because existing methods failed, that is where the line shifts.
When Performance Optimisation Becomes R&D
Let us look at three agency scenarios and assess each one against HMRC's criteria.
Scenario 1: The Standard Optimisation Project (Does Not Qualify)
Your client runs an ecommerce site on Shopify Plus. Page load times are slow on mobile. Your team implements lazy loading, optimises images, minifies JavaScript, and switches to a CDN with edge caching. Load times drop by 40%.
Does this qualify? No. Every technique you used is well-documented. There was no technological uncertainty. You applied known methods to a known problem. The outcome was predictable.
This is routine client work, chargeable at your standard rate. It is not R&D.
Scenario 2: The Genuine Technical Problem (May Qualify)
Your client is a SaaS platform handling real-time financial data feeds. Their existing database architecture cannot process 10,000 transactions per second without latency spikes that break their SLA. Off-the-shelf database solutions cannot handle the specific data structure. You design a custom in-memory caching layer with a novel indexing algorithm that reduces latency by 85%.
Does this qualify? Possibly. The key question is: could you have solved this problem using known methods? If the answer is no, if you had to develop a genuinely new approach because existing database architectures, caching strategies, or indexing methods were insufficient, then you have overcome technological uncertainty.
The test is not whether the work was hard. It is whether the solution was not obvious to a competent professional in your field at the start of the project.
Scenario 3: The Research Phase (Qualifies Even Without a Solution)
Your client wants to build a video streaming platform that works reliably on sub-3G connections in rural areas. You spend six weeks researching compression algorithms, testing different codec configurations, and prototyping adaptive bitrate streaming approaches. You ultimately conclude that no existing solution meets the requirements, and you recommend the client pivot to a different product strategy.
Does this qualify? Yes. The research itself is qualifying R&D, even though you did not produce a working solution. HMRC recognises that technological uncertainty includes not knowing whether a solution is possible at all. The time spent investigating, prototyping, and testing counts, provided you documented it properly.
This is a common blind spot. Many agencies write off research phases as "pre-sales" or "discovery" and miss legitimate R&D claims worth tens of thousands of pounds.
Where Agencies Get Performance Optimisation R&D Claims Wrong
We see three recurring mistakes when agency founders try to claim R&D for optimisation work.
Mistake 1: Confusing difficulty with uncertainty. A project can be technically difficult, requiring senior developers working long hours, without involving any technological uncertainty. If you knew how to solve it from the start, even if the implementation was complex, it is not R&D.
Mistake 2: Claiming routine improvements as innovations. Reducing page load time from 3 seconds to 1.5 seconds using standard techniques is not R&D. It is good engineering. HMRC's R&D inspectors have seen hundreds of these claims and will challenge them.
Mistake 3: Not documenting the uncertainty. Even genuinely qualifying projects fail at HMRC review because the agency cannot demonstrate what was uncertain at the outset. You need contemporaneous records: project specs, meeting notes, technical briefs, test results, and developer time logs that show what you did not know and how you resolved it.
What Counts as Qualifying Costs
If your performance optimisation project meets the R&D tests, the qualifying costs include:
- Staff costs, salaries, employer NI, and pension contributions for developers and technical leads directly working on the R&D project. Time-sheeted and apportioned.
- Externally provided workers, contractors or freelancers working under your supervision. Usually 65% of the payments count as qualifying costs (the "connected" rules are different if the contractor is a related party).
- Consumables, software licences, cloud computing costs, and materials consumed in the R&D. For a performance optimisation project, this might include AWS or Azure compute costs for testing, or specialised profiling tools.
- Subcontracted R&D, if you pay another company to carry out R&D on your behalf, 65% of the payment qualifies. This is less common for agency-led projects.
For an SME agency, the R&D tax credit works as follows: you deduct 186% of qualifying costs from your taxable profits (for expenditure on or after 1 April 2023). If you are loss-making, you can surrender the loss for a cash payment worth up to 10% of the surrendered amount (subject to the £20,000 PAYE cap for R&D-intensive companies).
Let us put real numbers on it. A 12-person digital agency billing £800k per year spends £60,000 on staff time for a qualifying performance optimisation project. The enhanced deduction is £60,000 x 186% = £111,600. If the agency is profitable at the 19% small profits rate, the corporation tax saving is £111,600 x 19% = £21,204. That is real money back in your business.
The Boundary Between R&D and Non-R&D Work
Here is a practical framework. Before you start a performance optimisation project, ask yourself three questions:
- Is the problem solvable using known methods? If yes, it is not R&D. If no, proceed to question two.
- Would a competent developer in your field know how to achieve the desired outcome at the start? If yes, it is routine work. If no, you have technological uncertainty.
- Are you creating something that advances the state of the art in your field? Not necessarily a global breakthrough, just an advance within your specific technical domain. If yes, the work qualifies.
If you answer "no" to question one, "no" to question two, and "yes" to question three, you almost certainly have qualifying R&D. Talk to your accountant before the project ends, the documentation requirements are easier to meet when you plan for them upfront.
Real Examples From Agency Work
Here are two real claims we have prepared for agency clients, anonymised but factually accurate.
Example A: A creative agency building a custom CMS. The agency's client needed a content management system that could handle 3D product models, real-time AR previews, and synchronised inventory across 12 countries. Off-the-shelf CMS platforms could not handle the 3D rendering pipeline without unacceptable latency. The agency built a custom rendering engine that used WebGL optimisations and a novel asset streaming protocol. The project took 14 weeks. Qualifying costs: £87,000. Corporation tax saving: £28,700.
Example B: A digital agency optimising a real-time bidding platform. The client's ad exchange needed to process 2 million bid requests per second with sub-50ms response times. Existing load balancing approaches caused unacceptable latency spikes under peak load. The agency developed a distributed queuing system with predictive scaling that maintained response times within SLA. Qualifying costs: £124,000. Corporation tax saving: £40,900.
Both projects involved genuine technological uncertainty. Neither could have been solved by applying standard optimisation techniques. That is the difference between qualifying R&D and routine performance work.
How to Document Your Performance Optimisation R&D
If you think your next project might qualify, set up documentation from day one. HMRC will want to see:
- A project narrative, what was the technical problem? What made it uncertain? What approaches did you try that failed? What did you ultimately do to solve it?
- Contemporaneous records, project briefs, technical specifications, test results, meeting notes, and developer time logs. These should be created during the project, not reconstructed afterward.
- Time apportionment, clear records of which staff worked on the R&D project and how much time they spent. If a developer splits their week between R&D work and routine client work, you need a timesheet showing the split.
- Qualifying cost breakdown, a schedule showing staff costs, contractor costs, consumables, and any subcontractor costs, with supporting invoices and payroll records.
We recommend using a tool like Xero or QuickBooks with project tracking enabled, and recording R&D time against a specific project code. If you use FreeAgent, you can set up a separate project for R&D work and tag relevant expenses.
As ICAEW qualified accountants, we prepare R&D claims for agencies across the UK. We see the same pattern repeatedly: agencies that document their R&D work properly from the start get through HMRC reviews smoothly. Agencies that try to reconstruct documentation after the fact often face challenges, delays, and in some cases, rejected claims.
What to Do Next
If you have a performance optimisation project in your pipeline, or one you completed in the last two years, ask yourself whether it involved genuine technological uncertainty. If the answer is yes, speak to your accountant before the next corporation tax return deadline.
For SME agencies, the deadline for amending a return to include an R&D claim is 12 months after the filing deadline. That means you can typically go back two accounting periods and claim R&D tax credits you missed. Do not assume it is too late.
If you want to discuss whether a specific project qualifies, our team works exclusively with agency founders. We understand the technical work you do and can assess your claim against HMRC's criteria. Get in touch and we will walk through it together.

