R&D Tax Credit for AI and Machine Learning Development
Artificial intelligence and machine learning development is among the most naturally qualifying work for the federal R&D tax credit under IRC Section 41. The core nature of AI work — experimenting with model architectures, tuning hyperparameters, and iterating toward uncertain performance targets — maps directly to the IRS four-part test for qualified research.
Why AI and ML work qualifies particularly well
The four-part test requires a permitted purpose, technological uncertainty, a process of experimentation, and work that is technological in nature. AI development satisfies all four almost by definition:
- Technological uncertainty is inherent. When you begin training a model, you cannot predict whether a given architecture, dataset, or training approach will achieve acceptable accuracy, latency, or generalization. This uncertainty is not a business risk — it is a genuinely technical question that can only be resolved through experimentation.
- Experimentation is the standard workflow. ML engineers routinely test multiple architectures, loss functions, data augmentation strategies, and hyperparameter configurations. Each training run is an experiment designed to evaluate alternatives and eliminate uncertainty.
- The work is technological in nature. AI development relies on computer science, mathematics, and engineering principles — the hard sciences that the IRS requires.
- The purpose is almost always permitted. Developing new or improved AI capabilities, features, or performance characteristics meets the requirement of creating a new or improved business component.
Qualifying AI and ML activities
The following activities frequently qualify for the R&D tax credit when they involve technological uncertainty and a process of experimentation:
- Training custom models — building neural networks, gradient-boosted models, or other ML systems from scratch for specific use cases
- Fine-tuning large language models — adapting foundation models like GPT, LLaMA, or Claude to specialized domains, tasks, or performance requirements
- Building ML pipelines — developing feature engineering, training, evaluation, and deployment infrastructure where the technical approach is uncertain
- Computer vision development — object detection, image segmentation, video analysis, and other vision systems where model performance is uncertain
- Natural language processing — text classification, named entity recognition, sentiment analysis, machine translation, and language understanding systems
- Recommendation engines — collaborative filtering, content-based, or hybrid recommendation systems requiring experimentation with algorithms and features
- Reinforcement learning — developing agents, reward functions, and training environments for robotics, game playing, or decision-making systems
- Data engineering for ML — building novel data processing systems specifically to support model training where the technical approach involves uncertainty
- MLOps infrastructure — creating model serving, monitoring, retraining, and experiment-tracking systems that require solving technical challenges
- AI safety and alignment work — research into model interpretability, bias detection, adversarial robustness, and alignment techniques
- Retrieval-augmented generation (RAG) — developing retrieval systems, embedding strategies, and generation pipelines where the optimal architecture is uncertain
Activities that typically do not qualify
Not all work involving AI meets the four-part test. The following activities generally lack the technological uncertainty required for qualified research:
- Using off-the-shelf AI APIs without modification — calling a pre-built API (such as a translation or sentiment API) and integrating the results into your application is routine software development, not experimentation
- Prompt engineering alone — crafting prompts for an existing model does not typically involve the kind of technological uncertainty or systematic experimentation the IRS requires
- Routine data labeling — annotating data for production use, without technical uncertainty about the labeling approach or its effect on model performance, is not qualified research
- Deploying pre-trained models without customization — downloading and deploying a model in its existing form does not involve experimentation
- Cosmetic UI changes to AI-powered features — adjusting how AI results are displayed, without changing the underlying model or system, is not R&D
Qualifying expenses for AI companies
AI companies can claim several categories of qualified research expenses (QREs):
- W-2 wages for ML engineers and researchers — salaries, bonuses, and stock-option-related compensation for employees performing, supervising, or directly supporting qualified AI research
- GPU and TPU compute costs — cloud computing expenses for model training, hyperparameter tuning, and experimentation are treated as supply costs under IRC Section 41(b)(2)
- Data annotation costs — when annotation is an integral part of the experimentation process (for example, creating labeled datasets to test a novel model architecture), these costs may qualify
- Contractor costs — payments to third-party contractors performing qualified AI research on your behalf, at 65% of the contracted amount per IRC Section 41(b)(3)
- Cloud storage and data processing — storage and compute costs consumed during qualified research activities
Why AI companies often have high credit amounts
AI and ML companies frequently generate larger R&D credits than companies in other industries for two reasons:
- High engineer compensation. ML engineers and AI researchers command some of the highest salaries in the technology industry. Since W-2 wages are typically the largest category of QREs, higher salaries translate directly to larger credits.
- Significant compute costs. Training large models requires substantial GPU or TPU compute, which qualifies as a supply expense. A single training run can cost thousands to hundreds of thousands of dollars, and AI teams typically run many experiments. These costs stack on top of wage-based QREs.
Combined, these factors mean that an AI company with even a small team can generate a meaningful R&D credit — often 6% to 8% of qualifying expenses under the regular credit method, or more under the alternative simplified credit.
How TaxCredit4U helps AI companies claim the credit
TaxCredit4U is built for technology companies. The platform lets you enter your AI projects, the employees who worked on them, and your associated costs — including compute expenses. You describe the technical uncertainty and experimentation involved in each project, and TaxCredit4U uses that information to calculate your credit and generate the documentation you need for your tax return.
- Enter your AI and ML projects with descriptions of the technical challenges and experiments involved
- Assign employees and allocate their time to each qualifying project
- Record supply costs including GPU and TPU compute used for training and experimentation
- TaxCredit4U calculates your credit using both the regular and alternative simplified methods so you can choose the higher result
- Generate Form 6765 and supporting documentation ready for your CPA or tax preparer
Frequently asked questions
- Does using pre-trained models like GPT disqualify my R&D?
- No. Fine-tuning foundation models, developing retrieval-augmented generation (RAG) systems, and building novel applications on top of pre-trained models can all qualify for the R&D credit. The key is whether your work involves technological uncertainty and a process of experimentation, not whether you started from scratch.
- Do GPU cloud costs for model training qualify as supplies?
- Yes. Compute resources consumed during qualified research — including GPU and TPU cloud instances used for model training, hyperparameter tuning, and experimentation — are treated as supply costs under IRC Section 41(b)(2). These costs can form a significant portion of an AI company’s R&D credit.
- Can data annotation costs qualify?
- Only if the annotation work is part of the experimentation process itself. For example, creating specialized labeled datasets to test whether a new model architecture can learn a particular task may qualify. Routine data labeling for production use or general dataset preparation typically does not.
- What about research that does not produce a working model?
- Failed experiments still qualify. The R&D credit does not require success. As long as the work met the four-part test — permitted purpose, technological uncertainty, process of experimentation, and technological in nature — the expenses are qualified regardless of whether the model achieved acceptable performance.
Building AI? Find out what your R&D credit could be worth. Estimate your credit in about three minutes — free, no account required.