Get FP&A best practices, research reports, and more delivered to your inbox.
AI spend is COGS, OPEX or R&D depending on what caused the cost, not on the vendor named on the invoice. Customer-triggered inference, customer-facing agents and AI hosting are cost of goods sold; employee seats and internal copilots are operating expense in the team that uses them; coding assistants, experimentation and model work are R&D. Only implementation or development work that meets your capitalization policy gets capitalized, and seats and experiments almost never do.
That's why one Anthropic or OpenAI bill can land in three or four places on the P&L. The same API serves your product, your support team's internal agent and your engineers' prototypes, so the classification has to follow the usage, not the vendor.
Bottom line: Ask what caused each AI cost. Customer usage goes to COGS, employee usage to the OPEX of the team that consumed it, building something new to R&D, and only qualifying implementation or development of durable software is capitalized, under ASC 350-40 in the US or IAS 38 under IFRS. Check the capitalization calls with your auditors before you book them.
How to classify AI costs on the P&L
Classify each AI cost by its cause, and only the costs your customers trigger count as AI COGS. This table covers the common cases:
Three judgment calls come up most often:
- Coding assistants. If your engineers build the product you sell, their AI coding tools are R&D along with the rest of engineering. If the same tool is used by an internal data or IT team, it follows that team's OPEX line.
- Support AI. SaaS companies usually report customer support in COGS, so AI that answers customer tickets follows it there. If your support costs sit in sales and marketing or G&A, the AI follows them.
- Evaluation and data work. Labeling, evaluation datasets and model testing are R&D while you're building or improving a feature. Once a feature is live, the routine monitoring that keeps it running for customers can move to COGS with the rest of the delivery cost.
How to split one AI provider bill across the P&L
Split by usage source first, then classify each piece. Most AI providers let you separate usage by API key, project or workspace, so set those up to match the classification rather than the org chart:
- Separate production from internal usage. Give customer-facing features their own keys or projects, so their usage lands straight in COGS.
- Give internal agents and tools their own keys, tagged to the function that owns them (support, finance, sales operations).
- Keep engineering experimentation separate from production, so prototypes go to R&D and never inflate COGS.
- Allocate seats by the seat roster, using each person's department from the HRIS.
- Reconcile the total to the general ledger each month before you report the split.
Here's how that plays out on an illustrative month: a $50,000 provider bill where production keys used $28,000, engineering experimentation $8,000, an internal finance and support agent $6,000, and 160 employee seats $8,000. The split is $28,000 to COGS (56%), $8,000 to R&D (16%), and $14,000 to OPEX (28%), with the seat cost spread across departments by headcount.
At company level, the same logic produces the kind of answer a board can use. The example in our budgeting for AI spend guide is a company with $1.2M of AI spend: about half employee OPEX, 30% product development (R&D), 15% customer-delivery COGS and 5% capitalized implementation work. For splitting the OPEX share across departments and cost centers, the method is the same as any shared cost; see our guide to automating cost allocations. To pull the usage data out of each provider, use our walkthrough for exporting AI spend from Claude, ChatGPT and Cursor.
When can a company capitalize AI costs?
Only when the cost creates a durable asset and meets the capitalization criteria in your accounting framework. Subscription fees, seats and tokens consumed are expensed as you use them, and so is experimentation. What can qualify is the work of building or implementing software you'll use for years.
Under US GAAP:
- Internal-use software (ASC 350-40). Costs of developing AI tools or agents for internal use can be capitalized once the project meets the criteria. Today that means the application development stage. ASU 2025-06, issued by the FASB in September 2025, removes the project stages: capitalization starts once management has authorized and committed to funding the project, completion is probable, and any significant development uncertainty has been resolved. It's effective for annual periods beginning after December 15, 2027, and early adoption is permitted.
- Implementation of a hosted AI service. For a cloud or SaaS arrangement that's a service contract, qualifying implementation costs are capitalized and amortized over the hosting term, presented in the same line as the hosting fees (ASU 2018-15). The subscription fees themselves are still expensed.
- AI built into software you sell. Software to be sold, leased or marketed follows separate guidance, and in practice little is capitalized before the product is ready for release.
Under IFRS, IAS 38 applies: research costs are expensed, and development costs are capitalized only when the six recognition criteria are met, including technical feasibility and the intention and ability to complete and use the asset. Most early AI work stays in research.
The most important detail is the development-uncertainty test. AI projects often depend on whether a model performs well enough, which is exactly the kind of uncertainty that keeps costs expensed until it's resolved. Agree the policy with your auditors before you capitalize anything.
Worked example: capitalizing an internal AI agent
Here's how the rules play out on one illustrative project: an accounts payable agent built in-house to code and route invoices.
- January to March, prototype: $80,000, expensed. Engineers test models and prompts against last year's invoices. Nobody knows yet whether accuracy will be good enough, so this is significant development uncertainty and the cost goes to R&D or the owning team's OPEX.
- April, the go decision. The prototype hits its accuracy target, and management approves and funds the production build. Under the ASU 2025-06 criteria, capitalization can start here, once completion is probable.
- April to July, production build: $150,000, capitalized. Integration with the ERP, approval workflows, security review and testing are booked as internal-use software.
- August onward, running it: expensed. Model tokens, hosting and monitoring are operating costs of the finance function, recorded as consumed.
- Amortization. If the company assigns a three-year useful life, the $150,000 is amortized at $50,000 a year from go-live.
The same project under today's stage-based rules would land in a similar place, since April roughly marks the start of the application development stage. The judgment calls are when uncertainty is resolved and how long the useful life is, which is why the policy should be written down and agreed with your auditors before the build starts.
Why AI cost classification matters
Because it changes the numbers investors and boards look at first. AI inference in COGS lowers gross margin; the same cost in R&D doesn't. Take an illustrative company with $20M of revenue and $4M of COGS, an 80% gross margin. If $600K of customer-facing inference has been sitting in R&D and moves into AI COGS where it belongs, gross margin falls to 77%, three points, with no change in what the company actually spent. For SaaS companies, the 2026 benchmark median software gross margin held at 80%, and AI costs haven't compressed it at the median yet, which makes it more important to isolate AI inference inside COGS so you can see compression when it arrives. On the other side of the P&L, AI's share of R&D is becoming its own benchmark: the median SaaS company puts 10% of R&D toward AI.
Classification also drives the forecast. COGS AI grows with customers, OPEX AI with headcount and adoption, R&D AI with the roadmap, so each needs a different driver; our guide to forecasting AI spend in next year's budget covers them, and the FY2027 budgeting software guide covers where the AI line fits in the wider plan. Model choice moves AI COGS directly: routing routine product calls to cheaper models lowers the unit cost, and our comparison of the best LLMs for finance teams covers current pricing tiers.
What counts as AI COGS for a SaaS company?
AI COGS is the AI cost of delivering your product to paying customers. For most SaaS and AI-native companies that means:
- Inference behind product features: every model call your application makes when a customer uses an AI feature, whether it's a summary, a chat answer, a classification or a generated document.
- Customer-triggered agents: agent runs that execute work for a customer, including the tool calls and retries inside each run.
- AI-specific hosting: vector databases, retrieval infrastructure, GPU or model hosting, and monitoring that exist to serve the product.
- Third-party AI APIs embedded in the product, such as speech, translation or document parsing services billed per use.
- Support AI, where customer support is reported in COGS.
What stays out of AI COGS: model training or fine-tuning for a future feature (R&D), evaluation and experimentation (R&D), internal analytics on product usage (OPEX), and employee AI tools, even when the employees are the ones supporting customers on non-AI work. A useful test is whether the cost would disappear if customers stopped using the product. If it would, it's COGS.
How should you present AI costs to investors and auditors?
Consistently, and with the policy written down. Investors compare gross margin across periods and against peers, so a company that moves AI inference between COGS and R&D from one quarter to the next makes its own trend unreadable. Auditors look for the same thing: a documented policy, applied the same way every period, with evidence behind each judgment.
Three habits make both conversations easier:
- Show AI inside the lines, not as a separate P&L line. Keep AI costs in COGS, R&D and OPEX where they belong, and disclose the AI share of each in board materials or the MD&A where it's material.
- Keep a short classification memo. One page covering what counts as AI COGS, how seats are allocated, and the capitalization criteria, reviewed when a new product or agent goes live.
- Reconcile the AI total to the ledger every quarter, so the AI figure in the board deck ties to the financial statements.
How to set up AI costs in the chart of accounts
Keep the classification and the visibility separate:
- Book each AI cost in the normal P&L line it belongs to (COGS hosting, R&D software, department software expense), so your financial statements stay comparable.
- Add an AI tag or dimension across those lines, so you can report total AI spend and its split without restructuring the chart. A mapping layer such as Aleph's data consolidation can hold those mappings once and apply them to every period.
- Map usage sources to the tag, so each API key, project or workspace carries its classification.
- Review the mapping monthly, because new products, agents and pilots appear faster than the chart of accounts changes.
Common mistakes in classifying AI spend
- Classifying by vendor. Booking every Anthropic or OpenAI invoice to "software" hides customer-facing inference that belongs in COGS.
- One API key for everything. Production and experimentation on the same key make the COGS and R&D split a guess.
- Capitalizing seats or experiments. Subscriptions and exploratory work almost never qualify.
- Missing embedded AI. AI credits and tier upgrades inside existing software contracts are AI spend too, and they belong with the team using that software.
- Never revisiting the split. A pilot that becomes a customer feature moves from R&D to COGS when it goes live.
Track and classify AI spend with Aleph
Aleph connects your general ledger, HRIS and provider spend so AI actuals refresh automatically and classification mappings apply across every period, with the COGS, OPEX and R&D split live next to the rest of the P&L. Watch the From AI spend to AI budget replay, get the full framework and model in our budgeting for AI spend guide, or book a demo to see it on your own data.
Get FP&A best practices, research reports, and more delivered to your inbox.




