This page is general information, not legal or tax advice. Tax depends on your country, your residence, who owns the code and your full situation. Speak to a qualified accountant or tax lawyer before you sign any sale.
The short answer: in most of the countries below, how a code sale is taxed turns on three questions. Did you personally write the code, or did your company own it? Was it an asset of a business? And is it a sale or a license? A creator selling their own copyright is often taxed on ordinary income rather than as a capital gain, and a company selling code is usually taxed under its business rules. The sections below set out what official sources say, country by country, and where they leave the answer to your adviser.
Why does it matter how the sale is labeled?
Ordinary income is usually taxed at your normal income or business rates. Capital gains often get lower rates, allowances or discounts. The same cash price can therefore leave you with quite different amounts after tax depending on which rule applies.
The label is not your choice. It follows from facts: who created the code, who held the copyright, whether the code was used in a trade, and what the agreement transfers. That is why it helps to settle who owns the code before anything else, because the owner is also the taxpayer.
How does the shape of our deal affect tax?
Odys AI Labs buys code for cash, as one agreed price, paid on transfer. There are no earn-outs and no royalties. That keeps things simple in three ways:
- It is a sale, not a license. You transfer the rights in the code your team wrote under a written agreement.
- There is usually one payment moment. Rules for deferred or installment payments matter less when the full price is paid on transfer.
- The code is sold on its own, not as part of a running business with goodwill and customers.
Our guide on how selling your old code works shows where the agreement and payment fall, and our guide to what is in a source code purchase agreement explains what the document says about the price.
How is a code sale taxed in the United States?
If you personally wrote the code. US law excludes from capital assets “a copyright, a literary, musical, or artistic composition, a letter or memorandum, or similar property” held by a taxpayer whose personal efforts created it. The same exclusion covers someone whose basis comes from the creator, for example by gift. IRS Publication 544 says the sale of such property “results in ordinary income and is generally reported in Part II of Form 4797.” There is an election to treat self-created work as a capital asset, but it covers music only, not software.
One caution: the statute says “similar property” and does not name software or source code. Whether your codebase falls in the exclusion is a question for a tax adviser.
If a business owned the code. Publication 544 lists business assets as noncapital assets, so software used in a business may not get plain capital asset treatment. If the business wrote off the cost of the software over time, past write-offs can make part of the gain ordinary income under the section 1245 recapture rules, which cover intangible property subject to amortization.
If you sell a whole business instead. Publication 544 says the sale of a trade or business for a lump sum is “a sale of each individual asset rather than of a single asset,” and both sides report the price allocation on Form 8594. Selling code alone is different, and our comparison of selling the code only vs the whole software business explains the trade-offs.
Capital gain rates, where they apply. For an asset that does qualify as a capital asset and was held more than one year, the gain is usually long-term, taxed at 0%, 15% or 20% depending on taxable income.
No form does not mean no tax. The IRS says “All income, no matter the amount, is taxable” unless the law says otherwise, even if you do not receive a Form 1099-K.
How is a code sale taxed in the United Kingdom?
Individuals who created the code. HMRC’s Business Income Manual, citing Glasson v Rougier, says “A sum received by a professional author for the sale of copyright represents taxable income.” We could not find an HMRC page dealing specifically with a non-professional individual selling software copyright, so ask an adviser how your case is treated.
Companies. For UK companies, software that is not treated as part of related hardware may well amount to an intangible fixed asset under the corporate intangibles rules in CTA 2009 Part 8. Under those rules, “All receipts from those assets… are similarly revenue items”, so a company’s sale of IP is generally taxed as income. Corporation Tax is 25% main rate and 19% small profits rate, with Marginal Relief between. A company can instead elect to treat capital spending on software under capital allowances (section 815), but the election must be in writing within two years of the end of the relevant accounting period and cannot be revoked.
Where Capital Gains Tax applies. For individuals, CGT rates are 18% and 24%, and the annual exempt amount is £3,000. Business Asset Disposal Relief has a rate of 18% from 6 April 2026; a sole trader or partner must have been in business at least two years, and on closure the assets must be disposed of within three years.
Timing. For capital gains, the date of disposal is when the contract is made, or, if conditional, when the conditions are satisfied. Signing, not payment, sets the tax date.
If the code sits in a dissolved or insolvent UK company, tax is only one question; who can sell it comes first. Our guide on selling code when the company is dissolved or in liquidation covers that.
How does VAT work on a code sale in the EU?
The EU VAT Directive treats “the assignment of intangible property” as a supply of services (Article 25). Services to a business customer are supplied where that customer is established (Article 44). When you sell services to a business in another EU country, the EU says you “don’t usually need to charge” VAT, because the customer accounts for it under the reverse charge, though “several important exceptions” exist.
A transfer of a whole business can fall outside VAT under Article 19, but only where the member state has chosen to apply that option. A sale of code alone is usually not a business transfer.
What about income tax in EU countries such as Estonia and Germany?
Income tax is national, so each EU country has its own rules. Two examples from official sources, neither of which mentions software specifically:
- Estonia. Individual income tax is 22% in 2025 and 2026, and “gains from transfer of property” are taxable income. An Estonian company pays corporate income tax (22/78) when it distributes profit.
- Germany. A private sale of “other assets” is taxable under § 23 EStG if bought and sold within one year, or ten years where the asset produced income in at least one calendar year. Closing a business restarts the clock, business property follows business rules first, and total private sale gains under 1,000 euros in a calendar year stay tax-free. Income from time-limited provision of rights is rental and leasing income under § 21 EStG.
For any other EU country, ask a local adviser.
How is a code sale taxed in Canada?
The Canada Revenue Agency’s folio on artists and writers says “Royalties are considered payments received as compensation for using or allowing the use of a copyright”, and that royalty income tied to a creator’s business is generally business income. We could not find an official CRA page on whether an outright sale of software copyright by its creator is capital or business income, so this is a point for your accountant.
Where a sale does produce a capital gain, the Government cancelled the proposed increase and the inclusion rate stays at one-half: half of the gain is taxable. A capital gains reserve can spread a gain when proceeds are paid later, which matters less when the full price is paid on transfer.
How is a code sale taxed in Australia?
The ATO says “Intellectual property is a depreciating asset under the capital allowance rules”, and a depreciating asset used solely for business or other taxable purposes is not subject to CGT. Selling it is a “balancing adjustment event.” The ATO’s statutory effective life for in-house software is 5 years, and for copyright the shorter of 25 years or the remaining copyright period.
Where CGT does apply, resident individuals who held the asset at least 12 months can cut the gain by 50%, but companies cannot use that discount. The CGT event happens when the disposal contract is entered into. Small businesses may qualify for small business CGT concessions. We could not find an ATO page on how an individual creator’s sale of software copyright is taxed outside a business.
How do the five regions compare?
| Region | Creator sells own code | Company sells code | Timing point | Official gap to ask about |
|---|---|---|---|---|
| United States | Usually ordinary income (Form 4797) | Business asset; recapture may apply | Year of sale | Whether code is “similar property” |
| United Kingdom | Professional author: income | Usually revenue under CTA 2009 Part 8 | Contract date for CGT | Non-professional individual sellers |
| EU (VAT) | Assignment is a service | B2B reverse charge usually | Per national rules | Exceptions to reverse charge |
| Canada | Royalties often business income | Business rules | Proceeds and reserve rules | Outright sale by creator |
| Australia | Not stated by ATO | Depreciating asset, balancing adjustment | Contract date for CGT | Individual creator outside a business |
Is selling taxed differently from licensing?
Often, yes. In the US, payments for use of property are “taxable to you as rental income”, though payments for exclusive use of a copyright are treated as received from a sale. In Australia, royalties for use of copyrighted material are assessable business income. In Germany, as above, time-limited rights are rental income. Our comparison of selling code outright vs licensing it covers the non-tax differences too.
What should you ask your accountant before signing?
- Is the code mine personally, my company’s, or someone else’s, and who is the taxpayer?
- Is the sale ordinary income, business income or a capital gain in my country?
- Did I or my company write off the cost of the software, and does recapture or a balancing adjustment apply?
- Which date sets the tax year: signing or payment?
- Is VAT or a reverse charge relevant to this sale?
- Do any reliefs apply, such as Business Asset Disposal Relief or small business concessions?
What to do next
- Confirm who owns the code, because the owner is the taxpayer.
- Take this page and your draft agreement to a qualified accountant.
- When you are ready, send us a few details for a free code valuation; an offer carries no obligation.
This page is general information, not legal or tax advice. Rules change and depend on your circumstances. Speak to a qualified accountant or tax lawyer about your specific sale.
Frequently asked questions
Is selling code I wrote myself a capital gain in the US?
Usually not. US tax law excludes from capital assets a copyright or similar property held by the person whose personal efforts created it, and IRS Publication 544 says such a sale results in ordinary income, generally reported on Form 4797. Whether a particular codebase counts as similar property is a question for a tax adviser, so check your own case before you sign.
When does the tax on a code sale fall due?
It depends on the country. In the UK, the date of disposal for capital gains is when the contract is made, not when you are paid. In Australia, the relevant event happens when the disposal contract is entered into. In the US, the year of sale generally matters. Because we pay one cash price on transfer, contract and payment are usually close together, but ask your accountant.
Do I charge VAT when I sell code to a business in another EU country?
Usually not. Under the EU VAT Directive, assigning intangible property such as the rights to code is a supply of services, and services to a business are generally taxed where the customer is established. The business buyer usually accounts for VAT under the reverse charge, though there are exceptions, so confirm with an accountant.
Does it matter whether I or my company owns the code?
Yes, a great deal. A company selling code is usually taxed under business or corporate rules, while an individual creator may face income tax on the sale. In the UK, receipts from a company's intangible assets are generally revenue items taxed at corporation tax rates. Who owns the code also decides who must sign, so settle that first.
Is a sale taxed differently from licensing my code?
Often, yes. Payments for the use of property are generally rental or royalty type income in the US, Australia and Germany, while an outright sale transfers the asset itself. In the US, granting exclusive use of a copyright can even be treated as a sale. Odys AI Labs buys outright for one cash price, so the sale rules are the ones to check.
Find out what your old code is worth right now.
Tell us about the product in about a minute. No code needed. We review the details and come back with a cash offer or a plain no.
Get my free code valuation →