In short
AI companies can claim a federal research and development tax credit under section 41 of the Internal Revenue Code. 26 U.S.C. § 41 They can also deduct domestic research and experimental costs immediately under new section 174A, enacted by the One Big Beautiful Bill Act in July 2025. 26 U.S.C. § 174A Before that, the Tax Cuts and Jobs Act required those costs to be amortized over five years. The credit is worth up to 20 percent of qualified research expenses above a base amount, or 14 percent under the simplified method. Software developed for internal use faces a stricter test. Small startups may apply the credit against payroll taxes.
How does the research and development tax credit work?
The section 41 credit is a dollar for dollar reduction of a company’s federal income tax. It rewards companies that invest in qualified research in the United States. The company calculates the credit based on its qualified research expenses, or QREs. QREs include in-house wages for employees performing qualified research, the cost of supplies used in the research, and 65 percent of payments to outside contractors who perform qualified research on the company’s behalf. 26 U.S.C. § 41(b), Cloud computing time that is rented for research can count as a QRE if it is treated as computer rental costs.
A company can choose between two methods to compute the credit.
| Method | Credit rate | How it works |
|---|---|---|
| Regular credit | 20 percent | Credit equals 20 percent of QREs that exceed a base amount. The base amount is tied to the company’s historical ratio of research spending to gross receipts. |
| Alternative simplified credit (ASC) | 14 percent (or 6 percent for startups without prior QREs) | Credit equals 14 percent of QREs that exceed 50 percent of the average QREs for the three prior tax years. If the company has no QREs in those years, the credit is 6 percent of current year QREs. |
Most technology companies, especially startups, use the ASC because it is easier to apply and does not require a long history of gross receipts.
The credit can be carried forward for up to 20 years if it cannot be used in the current year. IRS
To qualify for the credit, the underlying research must meet a four part test. The four part test has these elements.
- The expenses must be for domestic research or experimental expenditures under section 174A. This means the research happens in the United States and is connected to a trade or business.
- The research must be undertaken to discover information that is technological in nature. The information must be intended to be useful in developing a new or improved business component, such as a product, process, software, or technique.
- Substantially all of the activities must constitute a process of experimentation. That means at least 80 percent of the research activities, measured on a cost or other consistently applied reasonable basis, must constitute elements of a process of experimentation for a qualified purpose. Treas. Reg. § 1.41-4(a)(6)
- The research cannot be for certain excluded activities, such as routine data collection, market research, or research after commercial production. 26 U.S.C. § 41(d)(4)
For an AI company, building a custom machine learning model often meets this test. The team faces technical uncertainty about which architecture or training approach will achieve the desired accuracy. They evaluate multiple hypotheses through iterative experiments. The work is technological because it relies on computer science and engineering. So long as the expenses are domestic and not excluded, they can generate QREs.
What qualifies as research for AI development?
Not every activity an AI company undertakes counts as qualified research. The core question is whether the activity involves a process of experimentation to overcome technical uncertainty. The IRS audit guidelines for software rank activities by risk. IRS Audit Guidelines on Process of Experimentation for All Software
Activities that typically qualify include.
- Building proprietary machine learning models from scratch.
- Developing novel algorithms for a specific business problem.
- Fine tuning an existing foundation model for a specialized application, where the tuning requires trial and error.
- Creating AI infrastructure tools, such as training pipelines or data processing frameworks, that push technical boundaries.
- Iterative testing and evaluation of model performance under uncertain outcomes.
Activities that usually do not qualify include.
- Routine data collection without a hypothesis to test.
- Deploying a commercial off the shelf AI model without modification.
- Using AI tools merely to improve internal operations without developing new technology.
- Post development maintenance and minor updates that do not involve experimentation.
- Social science or market research.
An important hurdle for many AI companies is the internal use software exclusion.
The internal use software exclusion
Software that is developed primarily for internal use is eligible for the research credit only if, in addition to the standard four part test under section 41(d)(1), it passes the high threshold of innovation test, a strict three part test under Treas. Reg. § 1.41-4(c)(6)(vii). Treas. Reg. § 1.41-4(c)(6)(i), (c)(6)(vii)
Internal use software means software used for general and administrative functions that support the business. This specifically includes financial management, human resources management, and support service functions. Treas. Reg. § 1.41-4(c)(6)(iii)
Software is not internal use if it is developed to be sold, leased, or licensed to third parties. It is also not internal use if it is developed to let the taxpayer interact with third parties or to allow third parties to initiate functions or review data on the taxpayer’s system. Treas. Reg. § 1.41-4(c)(6)(iv)
Some types of internal use software are exempt from the high threshold test. They are.
- Software used in qualified research activities.
- Software used in a production process, like a factory control system.
- Software that is an integral part of a new or improved hardware and software package developed together as a single product.
Treas. Reg. § 1.41-4(c)(6)(ii)
For internal use software that is not exempt, the company must meet the high threshold of innovation test. The test requires showing that the software is innovative, meaning it achieves a substantial and economically significant improvement in cost, speed, or other measurable performance. It also requires significant economic risk, meaning the company committed substantial resources knowing there was substantial technical uncertainty about whether those resources could be recovered within a reasonable time. Finally, the software must not be commercially available, meaning it cannot be bought, leased, or licensed for the intended purpose without modifications that themselves would meet the innovation and risk requirements. Treas. Reg. § 1.41-4(c)(6)(vii)
This test sets a much higher bar than the ordinary process of experimentation requirement for software that is not internal use. The company must document how its software meets each element.
Many AI systems serve both internal and external functions. For example, a company may build an analytics platform that it uses internally for financial planning while also giving customers view only access. Under the regulations, such dual function software is presumed to be internal use software. A company can overcome that presumption by identifying a subset of elements that only enables interaction with third parties. If third party use is reasonably anticipated to be at least 10 percent of total use, a safe harbor allows the company to include 25 percent of the QREs for the remaining dual function subset in its credit calculation. Treas. Reg. § 1.41-4(c)(6)(vi)
For example, a company spends $400,000 developing an AI powered analytics platform. It uses the platform internally for financial planning and also gives customers view only access. If customer use is projected to be at least 10 percent of total usage, the dual function safe harbor applies. The company can include $100,000 (25 percent of the $400,000) in its QREs for the credit without having to pass the high threshold test on those costs.
Deducting research costs, section 174 and the new section 174A
The rules for deducting research and experimental expenditures have changed several times. Here is a summary timeline.
| Tax years | Domestic R&E expenditures | Foreign R&E expenditures |
|---|---|---|
| Before 2022 | Immediate deduction | Immediate deduction |
| 2022 through 2024 (under the TCJA) | Must capitalize and amortize over 5 years | Must capitalize and amortize over 15 years |
| Beginning after 2024 (under the OBBBA) | Immediate deduction under new § 174A | Still amortize over 15 years under § 174 |
26 U.S.C. § 174, 26 U.S.C. § 174A
The Tax Cuts and Jobs Act, effective for tax years starting after December 31, 2021, changed the law to require that all specified research or experimental expenditures, including all software development costs, be capitalized and amortized. This meant that a company could no longer deduct these costs in the year they were paid or incurred. Instead, domestic costs were amortized over 5 years (60 months) and foreign costs over 15 years, beginning at the midpoint of the tax year. IRS Notice 2023-63 This change caused many companies with large research budgets to report higher taxable income and pay more tax.
The One Big Beautiful Bill Act, signed on July 4, 2025, enacted new section 174A. For tax years beginning after December 31, 2024, a company may again deduct domestic research and experimental expenditures immediately. The new law defines domestic research or experimental expenditures to include research costs that are not attributable to foreign research. It also specifically treats all software development costs as research or experimental expenditures. 26 U.S.C. § 174A(d)(3)
The OBBBA did not change the treatment of foreign research. Foreign R&E costs must still be amortized over 15 years. 26 U.S.C. § 174 And if property related to foreign R&E is sold or abandoned, the amortization continues. No additional deduction is allowed for the disposal. This rule applies to dispositions after May 12, 2025. 26 U.S.C. § 174(d)
Retroactive relief for open years
Two important elections allow companies to benefit from the new law for prior years.
First, a small business taxpayer may elect to apply section 174A retroactively to domestic R&E expenditures from tax years beginning after 2021 and before 2025. A small business taxpayer is one with average annual gross receipts of not more than $31 million for the three year period ending before the election year, applying controlled group aggregation rules. OBBBA § 70302(f)(1), Rev. Proc. 2025-28 The election must be made by filing amended returns for each affected year, on or before July 6, 2026. Tax alert
Second, all taxpayers with unamortized domestic R&E costs from 2022 through 2024 may elect to deduct the remaining unamortized amount entirely in the first tax year beginning after 2024. Alternatively, they may elect to deduct it ratably over the two year period beginning with that year. OBBBA § 70302(f)(2)
The election to amortize domestic R&E
Under section 174A, a company may also choose to capitalize and amortize its domestic R&E expenditures over a period of at least 60 months, starting the month the benefits are first realized. This election applies to all later years and can only be changed with IRS consent. 26 U.S.C. § 174A(c) For some companies that prefer to spread the deduction rather than take an immediate large deduction, this election may be useful.
Interaction between the credit and the deduction
If a company claims the section 41 research credit for qualified research expenses, it must also reduce its deduction for those same expenses. Under section 280C, for tax years after 2024, the domestic R&E deduction must be reduced by the amount of the credit. 26 U.S.C. § 280C(c)
A company can avoid the deduction reduction by electing to take a reduced research credit. The reduced credit equals the otherwise allowable credit minus the product of the credit and the maximum corporate tax rate (currently 21 percent). In effect, the credit is reduced by 21 percent, and the full deduction is preserved. The election must be made on the originally filed return. 26 U.S.C. § 280C(c)(2)
For example, a company has $200,000 of QREs and a potential section 41 credit of $20,000 under the ASC. Without the election, the company deducts only $180,000 ($200,000 minus $20,000) and claims the full $20,000 credit. With the election, the company deducts the full $200,000 but the credit becomes $15,800 ($20,000 minus $4,200). The choice depends on the company’s tax situation and whether it can use the credit.
Payroll tax offset for small AI startups
A startup with little or no income tax liability can still benefit from the research credit by applying it against payroll taxes. A qualified small business may elect to use up to $500,000 of its research credit each year to offset the employer portion of Social Security (6.2 percent) and Medicare (1.45 percent) taxes. The election can be made for up to five taxable years. The Inflation Reduction Act raised this annual cap from $250,000 to $500,000 for taxable years beginning after December 31, 2022. 26 U.S.C. § 41(h)
To be a qualified small business, the company must be a corporation or partnership with gross receipts under $5 million in the credit year. It must not have had gross receipts in any year before the five tax year period ending with the credit year. 26 U.S.C. § 41(h) That means the five year clock starts with the first year of gross receipts, not incorporation. Tax alert
The election is made on the originally filed Form 6765 (Section D). It cannot be made on an amended return. The credit first applies against payroll taxes for the quarter after the income tax return is filed. IRS Form 6765 Instructions
This payroll tax offset is especially valuable for AI startups that are before revenue or burning cash. It turns a tax credit into actual cash savings on quarterly payroll tax deposits.
Documentation and Form 6765
The IRS has tightened documentation requirements for the research credit. For tax years beginning after 2025 (that means tax years 2026 and later), companies must complete Section G of Form 6765. IRS Form 6765 Instructions
Section G requires a detailed breakdown of QREs by business component. A company must report the components that make up the top 80 percent of its total QREs, up to a maximum of 50 components. For each component, the company must split wages into direct research, direct supervision, and direct support categories. For software components, the company must classify them as internal use, not internal use, dual function, or excepted. IRS Form 6765 Instructions
Two groups are exempt from Section G. Qualified small businesses claiming the payroll tax credit are exempt. Also, taxpayers with total QREs of $1.5 million or less and average annual gross receipts for the prior three tax years of $50 million or less at the controlled group level are exempt from Section G on original returns. IRS Form 6765 Instructions
Even if exempt, every taxpayer claiming the credit must maintain thorough contemporaneous records. These records must show why each activity met the four part test and how costs were allocated. The IRS audit guidelines for software emphasize that the taxpayer bears the burden of proving a process of experimentation existed.
Real examples
The following examples show what AI companies have recovered, based on publicly reported information.
A machine learning startup with 35 employees received a total research credit of $750,000. It qualified 55 percent of its wages and 75 percent of its cloud compute expenses. Tax alert
An AI algorithm research firm with 180 employees received $1,200,000 in credits. It qualified 60 percent of wages, 70 percent of supplies, and 65 percent of contract research costs. Strike Tax
A software firm with 18 employees recovered $1.4 million through retroactive amended returns for 2022 through 2024. The firm combined prior year credits and refunds for taxes it had paid under the TCJA amortization rules, taking advantage of the OBBBA retroactive election. Strike Tax
Key takeaways
- The section 41 research credit is a valuable incentive. But it requires careful documentation and a real process of experimentation.
- Under the OBBBA, domestic R&E costs are now immediately deductible again, starting in 2025. Foreign R&E remains locked in 15 year amortization.
- Small businesses can retroactively fix 2022 through 2024 by filing amended returns by July 6, 2026.
- Internal use software faces a high bar. AI features in customer facing products usually avoid the internal use trap.
- Startups can monetize the credit through payroll tax offsets even before they owe income tax.
- Form 6765 Section G will require detailed component level reporting. Start preparing now.
Frequently asked questions
Q:What expenses qualify for the research credit?
A:Wages for employees performing qualified research, supplies used in the research, and 65 percent of contract research costs paid to U.S. based contractors. Cloud computing costs can qualify if they are for research use.
Q:How does the process of experimentation apply to AI model training?
A:Training a machine learning model is often a process of experimentation. The team formulates hypotheses about model architecture, hyperparameters, and data preprocessing. They test alternatives and evaluate results. This process aims to eliminate technical uncertainty about the best approach.
Q:Is all AI software automatically research?
A:No. If you simply implement an existing open source model without modification and deploy it for a routine business function, that likely does not involve a process of experimentation. The activity must involve technical uncertainty and systematic testing.
Q:How does the internal use software test affect AI companies?
A:If you build AI tools for internal administration, like HR or finance, you must meet the high threshold of innovation test. AI features that are sold to customers or that allow third party interaction are generally not internal use. Dual function software has special rules.
Q:Can a startup with no income tax liability use the credit?
A:Yes. If the startup is a qualified small business (gross receipts under $5 million, within the first five years of gross receipts), it can elect to offset up to $500,000 of the credit per year against employer payroll taxes. This can provide immediate cash savings.
Q:What changed for research costs in 2025?
A:The OBBBA brought back immediate deduction for domestic R&E costs. Before 2022, immediate deduction was allowed. From 2022 to 2024, companies had to amortize domestic costs over 5 years. Now, for tax years starting after 2024, immediate deduction is restored.
Q:Do I need to amend my 2022 through 2024 returns?
A:Small businesses (average gross receipts under $31 million) can file amended returns to deduct domestic R&E costs that were previously amortized under the TCJA. The deadline is July 6, 2026. All taxpayers can also elect to deduct remaining unamortized amounts in their first post 2024 year or over two years.
Q:Are foreign research costs treated differently?
A:Yes. Foreign R&E costs must still be amortized over 15 years. The OBBBA did not change that.
Q:What is the reduced credit election under section 280C?
A:If you claim the research credit, you must reduce your section 174A deduction by the credit amount. Alternatively, you can elect to take a reduced credit (credit minus 21 percent of the credit) and keep the full deduction. The election is made on the original return.
Q:When does Section G of Form 6765 become mandatory?
A:For tax years beginning after 2025, meaning it applies for tax years 2026 and later. Exemptions exist for small filers (QREs under $1.5 million and gross receipts under $50 million) and QSBs claiming the payroll tax offset.
Q:What should an AI company do to prepare for an IRS audit?
A:Keep detailed records for each business component. Show the technical uncertainties, the hypotheses tested, the experiments conducted, and the results. The IRS audit guidelines emphasize that the taxpayer must prove a process of experimentation.
Subscribe to The Compute Law Brief
The Compute Law Brief is a free weekday newsletter on the law of AI infrastructure across tax, real estate, construction, power, and deals. The big US build markets and federal law. Three minutes a morning. No paywall, and no email gate to read the blog. Subscribe if you want it in your inbox.
Junde Liu, JD, LL.M. (Taxation) candidate at UF Law. Originally published on Compute Law Blog. This article is general information and does not constitute legal advice. Reading it does not create an attorney client relationship. The reader should not act on the basis of any content here without first consulting a licensed attorney in the relevant state. Last reviewed for accuracy May 23, 2026.