AI as COGS, OPEX, or R&D: The Accounting Question Your Auditors Will Ask

7 min read · Updated 2026-05-02

When your external auditors ask, "How are you classifying your AI spend?" — and they will ask — you need a clear answer. This question has no universal ruling from FASB yet. But your choice between COGS, OPEX, and R&D has real consequences for gross margin, operating leverage, and how your board interprets financial performance.

This is the whitespace where CFOs have discretion and auditor judgment matters most. Understanding the logic and the trade-offs will let you defend your classification and, more importantly, set yourself up for consistent treatment as AI spend scales.

The Three Buckets: Definitions

COGS (Cost of Goods Sold) is the direct cost of delivering your product or service to a customer. In SaaS, COGS is usually hosting and hosting-related support. It scales with revenue.

OPEX (Operating Expense) is the cost of running the business — sales, marketing, admin, general support. It does not scale directly with revenue. When OPEX goes down as a percentage of revenue, that is operating leverage.

R&D (Research & Development) is the cost of building new capabilities or maintaining existing ones. It is expensed (not capitalized) unless it meets specific criteria for capitalization.

The Customer Support AI Example

Let us walk through a concrete example: an AI customer support agent that you are building for your SaaS product.

Scenario 1: AI support handles existing customer queries

Your AI agent handles support tickets that your human support team used to handle. Each ticket costs $0.50 in AI tokens and infrastructure. You are replacing human support cost.

In this case, the AI cost should be classified as COGS. Why? Because it is the direct cost of serving customers. It scales with support volume. It replaces a labor cost that was part of headcount COGS. When you reduce it as a percentage of revenue, you are improving gross margin — which is how SaaS companies show operating leverage to investors.

Your auditor will accept this because the economic substance is clear: it is a cost-of-service-delivery, just automated.

Scenario 2: AI support is a new feature you are selling

You build an AI agent and sell it as a new product line or as a premium tier to existing customers. Customers pay extra for "AI-assisted support."

Now the classification is murkier. You could argue for COGS (it is a direct product cost) or R&D (it is a product you built in-house). The difference matters:

  • If you classify it as COGS, gross margin on that revenue tier is lower (because you are subtracting the full AI cost). But revenue is higher.
  • If you classify it as R&D, gross margin on that revenue tier is higher (because R&D is below the line). But operating leverage looks weaker (because you are spending money on building a product, not delivering it).

Most auditors will push you toward COGS here if the AI agent is customer-facing and generates direct revenue. The substance test is: "Does this cost vary with customer usage?" If yes, COGS. If no, it is overhead, which pulls toward OPEX or R&D.

Scenario 3: Internal AI tooling (code generation, internal research)

You build an internal AI agent that helps your engineers write code faster (like GitHub Copilot). This is internal-only. It does not generate revenue.

This belongs in R&D or OPEX, not COGS. The question is whether it is a one-time capital investment or ongoing maintenance:

  • If it is a one-time build (you built an internal Copilot, it is done), it can be capitalized as a software asset and depreciated over useful life (typically 3 years). This is capitalized R&D.
  • If it is ongoing (you are constantly retraining the model, adding new features, maintaining integrations), it is OPEX.

Most companies will classify internal AI as OPEX because the audit trail and ongoing cost are visible and easily defensible. Capitalizing it requires you to prove it meets the criteria for asset recognition, which is harder.

The Audit Trail and Compliance Implications

Your auditor will ask for:

  1. A cost flow diagram. Where did the AI costs originate? (OpenAI API bill? Google Cloud bill? Labor to fine-tune a model?) Where did they end up? (COGS line? R&D line?)

  2. An allocation methodology. If AI costs are shared across customer support and internal engineering, how do you split them? (By usage volume? By time tracking? By contract?) Document this.

  3. Consistency. Whatever you decide this year, you need to apply it next year. If you classify AI support as COGS in 2026, you cannot reclassify it as R&D in 2027 (unless your business model fundamentally changed).

  4. Revenue recognition implications. If you capitalized AI tooling as an asset, that asset is depreciating. You need to make sure your revenue recognition does not count that depreciation twice.

The SOC 2 angle matters, too. If you are a SaaS company that sells to regulated customers (healthcare, finance), your auditors will want to see that you have cost attribution and allocation controls. A well-documented AI cost allocation methodology gives you control evidence.

The Trade-Offs: COGS vs OPEX Lens

From a board and investor lens, the choice has real consequences:

COGS treatment makes sense if:

  • The AI cost scales with customer usage or revenue.
  • You can tie the cost to a specific customer or product line.
  • The cost is a direct substitute for labor that used to be COGS.

Upside: Gross margin can improve as you optimize AI cost (economies of scale, better models). Downside: If AI costs are high, your gross margin looks weak relative to pure software.

OPEX treatment makes sense if:

  • The AI cost is shared infrastructure (a company-wide AI assistant, an internal research tool).
  • You cannot tie it to a specific revenue stream.
  • The cost is fixed or semi-fixed (does not scale linearly with usage).

Upside: Gross margin looks high (because OPEX is below the line). Operating leverage is visible as you scale revenue while holding OPEX flat. Downside: Growth investors may see high OPEX and discount your ability to be "lean." You need a strong story around why the OPEX is paying off.

R&D treatment makes sense if:

  • You are building new AI capabilities that will drive future revenue.
  • The cost is one-time or project-based (a capability you are building, not operating).
  • You can capitalize it and depreciate it over the useful life.

Upside: You avoid expensing the full cost in year one. Gross margin and operating margin look better short-term. Downside: You have to defend the capitalization to your auditor. If the AI capability is core to your product (like search in a search engine), it may need to be expensed as you go.

What Most Companies Are Doing (And What Auditors Are Accepting)

Based on discussions with auditors and finance leaders:

  • Customer-facing AI (support agents, recommenders, personalization) is being classified as COGS or Gross Profit Opex. This is the most common classification. It feels right economically (it is replacing labor cost) and it is defensible to auditors.

  • Internal AI (code generation, research tools, content creation) is being classified as OPEX or capitalized R&D. Most companies go with OPEX because the accounting is simpler and the cost is visible.

  • Model training and fine-tuning is being classified as R&D (expensed as incurred). This is standard across the industry.

  • AI infrastructure (cloud spend, vector databases, observability) is being split. If it is tied to customer-facing AI, it is COGS. If it is shared, it is OPEX. Allocation methodology is key.

The pattern: auditors are accepting pragmatic allocations as long as you can document the methodology and apply it consistently.

What To Do Next

Schedule a conversation with your external auditor before your next financial close. Walk through your AI spend by category and ask what they expect to see. Get their blessing on your classification and allocation methodology in writing. This prevents surprises in audit.

Document your allocation logic clearly: how you split shared costs, how you measure usage, how you handle reclassifications. This is your defense if the IRS or another regulator asks questions later.

Build cost-attribution systems now so that you can support this documentation. The CFOs who are winning are the ones who can point to work-item-level cost data and say, "This AI cost is COGS because it is the direct cost of serving this customer." The CFOs who will struggle are the ones who say, "It is somewhere in the cloud bill, but we do not know where."

Go deeper with the field guide.

A step-by-step PDF for implementing AI cost attribution.

Download the Guide

Was this article helpful?