What Actually Counts as COGS for Digital Products?
COGS (cost of goods sold) for digital products isn’t about physical inventory. It’s about direct costs tied to delivering your product to a paying customer. Simple test: If the cost disappears when revenue stops, it likely belongs in COGS.
Typically included in COGS:
- Cloud hosting used for customer access (AWS, Vercel, Netlify—customer-facing portion only)
- Payment processing fees (Stripe, PayPal, Square)
- Usage-based third-party APIs essential to delivery (Twilio for SMS, SendGrid for email, Mapbox for maps)
- Licensed content embedded in your product (stock video, music, fonts)
- Amortized software development costs (more on this below)
Typically excluded (these are OpEx, not COGS):
- Sales and marketing spend
- General R&D or product discovery
- Admin overhead (accounting software, HR tools, office rent)
- Website hosting for marketing pages (unless it’s part of the product delivery)
- Employee training, conferences, or equipment
Source: IRS Pub. 535, Chapter 8
The 5-Step COGS Calculation Method (GAAP + IRS Aligned)
Forget manufacturing formulas. Digital COGS is about tracing direct fulfillment costs. Here’s the workflow that works in 2026:
Step 1: Define Your Revenue Model
Is it SaaS (recurring), one-time digital download, or online course? This determines cost timing.
- SaaS: Costs recur monthly; amortization applies to development
- One-time download: Development costs amortized over expected sales period (e.g., 3 years)
- Online course: Production costs capitalized and amortized; hosting is recurring COGS
Step 2: Isolate Direct Fulfillment Costs
Ask: “If this customer didn’t exist, would I still incur this cost?” If no, it’s likely COGS.
Track these monthly:
- Hosting: Only the portion serving paying customers (e.g., if 70% of AWS usage is customer-facing, count 70%)
- Payment fees: Usually 2.9% + $0.30 per transaction—pull from Stripe/PayPal reports
- API usage: Twilio, SendGrid, etc.—pull usage reports, not just invoices
- Direct licensing: Stock assets used in deliverables (keep license records)
Step 3: Handle Software Development Costs (IRC §174)
Here’s the big change for 2026: you likely can’t expense developer salaries upfront anymore.
IRC §174 rule (plain English): Starting with tax years after December 31, 2021, specified research or experimental (SRE) expenditures—including most software development costs—must be capitalized and amortized. Domestic development: amortize over 5 years. Foreign development: 15 years. Only post-launch maintenance or minor bug fixes can be expensed immediately.
Note on thresholds: While some provisions have gross receipts tests, the capitalization requirement under IRC §174 applies broadly to software development. Small businesses should consult a CPA about potential safe harbors or relief provisions.
Monthly amortization formula:
(Total capitalized development costs) ÷ 60 months
Example: $150,000 in developer costs → $2,500/month amortization.

Source: CBH: IRC §174 Capitalization Guide
Step 4: Add Amortized Costs to Monthly COGS
Include the monthly amortization amount from Step 3 in your COGS total—but only if the software is essential to delivering your product.
Track this separately in your books. It’s a non-cash expense but critical for accurate gross margin.

Step 5: Calculate and Review Quarterly
COGS Formula:
Hosting (customer %) + Payment Fees + Usage APIs + Amortized Software + Direct Licensing
Real example: A SaaS company with $50,000 monthly revenue:
– AWS: $10,000 total, 70% customer-facing = $7,000
– Stripe fees: $3,000
– Twilio usage: $2,000
– Amortized dev costs: $150,000 ÷ 60 = $2,500
Total COGS: $14,500
Gross margin: ($50,000 – $14,500) ÷ $50,000 = 71%

Review this quarterly. Adjust hosting allocations, API usage, and amortization as your product evolves.
GAAP vs. IRS: Where They Align (and Where They Don’t)
You’ll report numbers two ways: GAAP for investors/lenders, IRS rules for taxes. They’re similar but not identical. Here’s the short version:
| Cost Type | GAAP Treatment (ASC 340-40 / 350-40) | IRS Treatment (2026) | Founder Action |
|---|---|---|---|
| Cloud hosting (customer-facing) | Expensed as COGS when incurred | Deductible as COGS when paid/accrued | Track usage %; allocate only customer portion |
| Payment processing fees | Expensed as COGS | Deductible as COGS | Pull from processor reports; no allocation needed |
| Software development wages | Capitalized & amortized over useful life (ASC 350-40) | Capitalized & amortized over 5 years domestic / 15 foreign (IRC §174) | Track time by project; amortize monthly; file Form 4562 |
| Post-launch maintenance | Expensed as incurred | Deductible immediately | Separate from development costs in time tracking |
| Licensed content (stock media) | Capitalize if multi-use; amortize over useful life | Same, if used in revenue-generating product | Keep license records; amortize over expected revenue period |
Bottom line: Build your COGS calculation to satisfy both. Track amortization separately. Reconcile quarterly.
Source: IRS Form 4562 Instructions

COGS by Business Model: Quick Reference
SaaS / Subscription Software
- Include: Customer-facing cloud hosting, payment processing, usage-based APIs, amortized development costs, customer support tools directly tied to service delivery
- Exclude: Sales commissions, marketing ads, internal tooling, security audits, developer training
Online Courses
- Include: Video hosting (Vimeo Pro, Wistia), payment fees, licensed media embedded in lessons, amortized production costs (contractor fees, editing), LMS fees for student access
- Exclude: Course marketing, website design, instructor travel, general software subscriptions
Digital Downloads (Templates, eBooks, Assets)
- Include: File delivery hosting, payment processing, embedded licensed assets, amortized design/development costs for the product
- Exclude: Marketing site hosting, SEO tools, affiliate payouts, admin software
Source: Industry benchmarks from IBISWorld and SBA

Real Scenarios: COGS in Practice
California SaaS startup (LLC, ~$800K annual revenue): Capitalizes $96K in developer salaries under IRC §174, amortizes $1,600/month over 5 years. Includes $6,000/month AWS (customer-facing portion), $1,800 Stripe fees, and $500 SendGrid usage in COGS. Total monthly COGS: ~$8,900. Gross margin tracked separately for investor reporting.
Florida online course creator (sole proprietor): Spends $12K on video production with a contractor. Capitalizes under IRC §174, amortizes $200/month. Includes $300 Vimeo hosting and $150 payment fees in COGS. No lump-sum deduction—amortization only.
Washington-based hybrid platform (e-learning + SaaS): Uses cost pools. Course content creation capitalized and amortized separately from platform development. Tracks API usage by product line to allocate Twilio and AWS costs accurately.
Note: These scenarios reflect common practices under current guidance. Your situation may vary—consult a CPA for entity-specific advice.

3 Mistakes That Trigger IRS Scrutiny (And How to Avoid Them)
- Expensing all developer costs upfront
IRC §174 requires capitalization for most software development in tax years after 2021. If you deduct $100K in developer salaries as a current expense, you’re likely underreporting taxable income. Fix: Capitalize development costs, amortize over 60 months (domestic), file Form 4562 with your return. - Counting 100% of hosting as COGS
If your AWS bill covers marketing site, staging, and production, only the production (customer-facing) portion belongs in COGS. Fix: Use AWS Cost Allocation Tags or similar to split usage. Document your methodology. - Ignoring amortization start timing
Amortization begins when the software is “placed in service” or ready for intended use—not when coding starts. Fix: Document your launch date; start amortization that month. Keep a simple log.
Common audit triggers to watch:
- COGS as a percentage of revenue that’s unusually high or inconsistent year-over-year
- Missing Form 4562 when amortizing software development costs
- Lack of documentation for direct cost allocation (hosting splits, API usage logs)
- Claiming contractor costs without issuing 1099-NEC when required
Potential penalties: Accuracy-related penalties under IRC §6662 can reach 20% of the underpayment if the IRS determines you understated tax due to improper COGS deduction or failure to capitalize. Documentation is your best defense.
Source: IRS Form 4562 Instructions
When to Capitalize vs. Expense: A Simple Decision Framework
Not sure if a cost should be capitalized or expensed? Ask these questions:
- Is this cost tied to creating or significantly improving a digital product? → Likely capitalize
- Is this cost for maintaining or operating an existing product? → Likely expense
- Will this cost provide benefit beyond the current tax year? → Likely capitalize
- Is this cost variable and tied directly to customer usage? → Likely expense as COGS
When in doubt, default to capitalization for development work. It’s safer under IRC §174. And keep records: time logs, project codes, usage reports. They matter more than you think.
Quick Answers to Founder Questions
What’s a typical COGS % for digital businesses?
SaaS: 20–35% of revenue. Online courses: 15–30%. Digital downloads: 10–25%. Your mix of hosting, APIs, and amortization will determine where you land. Track your own trend—benchmarks are guides, not rules.
Do I need to file Form 4562?
Yes, if you’re amortizing software development costs under IRC §174. File it with your business tax return (Schedule C for sole props, Form 1120-S for S-corps, Form 1120 for C-corps).
Can I use cash basis accounting and still calculate COGS correctly?
Yes. COGS calculation is about cost classification, not accounting method. Cash basis affects when you recognize revenue/expenses, not what counts as COGS. Just be consistent.
What if I’m under $25M in revenue? Do IRC §174 rules still apply?
Generally, yes. The capitalization requirement for software R&E expenditures under IRC §174 applies broadly starting with tax years after 2021. Some provisions have gross receipts tests, but the core rule isn’t limited to large companies. Consult a CPA about your specific situation.
Next Steps: Get Your COGS Defensible
- Review IRS Pub. 535, Chapter 8 – Focus on ordinary and necessary business expenses and capitalization rules
- Download Form 4562 – Required for reporting amortization of software development costs
- Consult a CPA with experience in IRC §174 and ASC 606—especially if you have nexus in CA, NY, or WA
- Set up quarterly COGS reconciliation: Match books to tax filings to catch mismatches early
One Last Thing
COGS isn’t a set-and-forget number. Update it quarterly. Document your allocations. Keep time logs for developer work. Save API usage reports.
If you operate in California, New York, or Washington—states with active digital tax enforcement—consider a quick review with a CPA who understands IRC §174 and ASC 606. Not for permission. For prevention.
Get COGS right, and you’ll have clearer margins, cleaner taxes, and stronger credibility with anyone who matters. That’s worth the extra hour of tracking.