Software companies
Is income from licensing code a royalty for tax purposes?
By SourceX Editorial · Reviewed by Noah Loul ·
Short answer
Income from licensing code or engineering records to an AI developer is often treated as royalty-type ordinary income for US tax purposes when your company keeps ownership and grants limited rights. A transfer of all substantial rights can look more like a sale. The contract terms decide, so have a tax adviser review the draft before signing.
Key takeaways
- Tax character follows what the contract actually transfers, not whether the document is titled license or sale.
- Keeping ownership, limiting use and setting a term all point toward license treatment.
- Preparation or delivery work bundled into the fee can create services income that is better stated separately.
- State sourcing, sales tax and foreign withholding are separate questions from federal character.
- Book revenue under ASC 606 and taxable income can land in different periods, so plan both together.
What makes licensing income a royalty?#
Licensing income is generally royalty-type income when the payment is for the right to use property your company continues to own, such as source code, commit history or code review records. Section 61(a)(6) of the Internal Revenue Code lists royalties as an item of gross income, and royalties are usually ordinary income, taxed like other operating revenue rather than at capital gain rates. Whether a particular data-license fee is a royalty or a payment for services still depends on the facts.
The opposite case is a sale or exchange. If the agreement transfers all substantial rights in the property, the transaction may be treated as a sale even when the document calls itself a license. Exclusive, perpetual, worldwide rights with no meaningful retained interest are the pattern advisers look for.
Do not assume a sale means capital gain either. Whether self-developed code and records qualify for capital gain treatment depends on technical rules about how the property was created and held. That question belongs with your adviser, with the facts of your company in front of them.
License or sale: the terms that shift the answer#
The license-or-sale question turns on a handful of contract terms, and an AI training agreement can be drafted either way. The table lists the terms advisers usually read first and which way each tends to point.
| Contract term | Points toward a license | Points toward a sale |
|---|---|---|
| Ownership | Your company keeps title to the code and records | Title or all substantial rights pass to the buyer |
| Exclusivity | Non-exclusive; you can license the same records again | Exclusive in every field and territory |
| Duration | Fixed term with renewal options | Perpetual and irrevocable with no conditions |
| Field of use | Limited to training and evaluating defined model types | Any use whatsoever |
| Transfer and sublicensing | Restricted or subject to your consent | Freely transferable and sublicensable |
| End of term | Deletion or return obligations apply | No obligations survive delivery |
| Payment form | Periodic, or tied to use or refreshes | One fixed payment at delivery |
Why no single clause decides the outcome#
No single clause decides the outcome because advisers weigh the agreement as a whole, and payment form alone rarely settles it. A lump sum for a non-exclusive, time-limited license can still be a royalty, while installments for an exclusive perpetual transfer can still be a sale.
AI training licenses add a wrinkle. Once a model has trained on records, the buyer cannot hand the learning back, so an adviser may ask whether the rights you keep after delivery are meaningful. Precise deletion terms, use limits, audit rights and a bar on resale help show what was retained.
Code licensed for training is also a different transaction from a software license to an end user. A customer who licenses your product runs it; an AI developer that licenses your repository history reads and learns from it, often alongside issues and review comments that are not software at all. US Treasury regulations include a framework for classifying transactions in computer programs, and whether it fits a mixed training dataset is a fact question for your adviser.
Which taxes besides federal income tax can apply?#
Licensing income can raise state, sales tax and cross-border questions that sit apart from federal character. Each depends on where your company files, where the buyer is located and how the records are delivered.
| Area | Question for your adviser | Why it matters |
|---|---|---|
| State income tax | How do our filing states source license or royalty income? | Sourcing rules differ, and some states look to where the buyer uses the property |
| Sales and use tax | Is a delivered dataset a taxable digital product in the buyer's state? | States treat data, digital goods and services differently |
| Foreign buyer | Will the buyer's country withhold tax on the payment, and does a treaty reduce it? | Royalties are generally sourced where the property is used (26 U.S.C. 861(a)(4) for US use), which affects withholding and foreign tax credits |
| US buyer forms | Which tax forms does the buyer need from us before paying? | Missing forms can delay payment or lead to backup withholding |
| Entity type | Could royalty income trigger special rules for our S corporation or closely held C corporation? | Some entity types face special rules on investment-type income |
| Services component | Should preparation or delivery work be priced separately? | Services income can be sourced and taxed differently from royalties |
How do book and tax treatment differ?#
Book treatment under ASC 606 and tax treatment answer different questions, so the same license can produce revenue in different periods for each. ASC 606 has specific guidance for licenses of intellectual property that looks at what the customer receives and when, while tax timing follows its own rules.
For a CFO, the practical result is a reconciliation item. A license with an initial delivery and a later refresh may be split differently in the financial statements than on the tax return, and usage-based payments add another layer: under ASC 606-10-55-65, a sales- or usage-based royalty for a license of intellectual property is recognized only when the later of the usage or the satisfaction of the related performance obligation occurs. Agree the treatment with your auditor and tax adviser before the first invoice, not at year-end. Bring these documents to the first meeting:
- The draft license, including exclusivity, term, field of use and deletion clauses.
- The payment schedule, with any refresh, usage or milestone payments.
- The delivery specification: which records, in what format, delivered how.
- Any statement of work for preparation, labeling or ongoing support.
- The buyer's legal entity name and country.
- Your entity type, filing states and any history as a C corporation.
Illustrative: a logistics software company reviews its first code license#
Illustrative: a fictional logistics software company, organized as a C corporation, receives a draft agreement from an AI developer. The developer wants a non-exclusive license to train coding models on the company's Git history, pull request reviews and linked Jira issues, with a fixed fee at delivery and a second fee for a later refresh.
The CFO sends the draft to the company's tax adviser along with the questions above. The adviser reads the agreement as a license: the company keeps ownership, can license the same history to others and can require deletion at the end of the term. The draft folded the company's preparation work into the license fee, so the CFO asks for it to be stated as a separate line item.
The buyer is a US entity and requests a completed W-9 before paying, which the company supplies at signing. The revised agreement goes to signature with the tax characterization written up in the deal file.
How SourceX structures licenses#
SourceX structures every transaction as a license, not an outright sale: the supplier keeps ownership of its records, and the buyer receives defined rights for a defined use. Those terms are set in the Rights and Approval steps of the SourceX five-step transaction, before anything moves in Delivery.
The SourceX Evidence Packet records the permitted use, licensing rights and release authorization for each package, which gives your adviser a clear description of what was granted. SourceX does not provide tax advice; character, sourcing and withholding are decided by your own advisers for your entity.
Frequently asked questions
Does calling the agreement a data license change the tax answer?
No. Labels do not control tax character; the rights actually transferred do. A document titled data license that grants exclusive, perpetual and freely transferable rights may still be analyzed as a sale. Draft the substance you intend, then name it accordingly.
Is income from licensing acquired code treated differently?
It can be. Code and records that came with an acquisition carry their own tax basis and history, and the purchase agreement may affect who holds which rights. Give your adviser the acquisition documents with the draft license so the rights question and the tax question are answered together.
Can licensing income change our estimated tax payments?
Yes, potentially. A license fee received in one quarter can raise taxable income for the year, which may affect federal and state estimated payments. Tell your adviser when payments are expected so estimates can be adjusted before a shortfall builds.
Do we owe sales tax on a dataset delivered on an encrypted drive?
Possibly, depending on the buyer's state and how that state treats data and digital products. Delivery on physical media can change the analysis in some states compared with electronic delivery. Ask your adviser to review the delivery method and the buyer's location before you invoice.
Should the license fee and preparation work be in one contract?
They can share a contract, but stating them separately usually helps. Royalty income and service income may be sourced, taxed and recognized differently, and a single blended fee forces someone to allocate it later. Separate line items make the allocation clear from the start.
Sources
- Section 61(a)(6) of the Internal Revenue Code lists royalties as an item of gross income. Source
- Under 26 U.S.C. 861(a)(4), royalties for the use of copyrights, secret processes and like property in the United States are US-source income. Source
- ASC 606-10-55-65 recognizes a sales- or usage-based royalty for a license of IP only when the later of the usage or satisfaction of the related performance obligation occurs. Source
Related resources
- QuestionCan SaaS data be licensed?
- InsightHow long must distributors keep sales, inventory and purchasing records?
- InsightWithholding tax on data license payments from foreign buyers
- InsightDerivative works clauses in insurance software contracts: what they allow
- IndustryLegal data
- DataSales and CRM data
See if your company qualifies
A short company assessment. No data uploads are needed.