How do I work out my cost basis and gain on XRP bought at different times and prices?
Confirmed Published 5 min read
Short answer
The gain is what the XRP brought in minus what those units cost, with buying and selling fees counted. The CRA calls the cost the adjusted cost base. Since January 1, 2025 the IRS applies basis rules wallet by wallet: holders may name the units sold by the time of sale, otherwise the earliest-bought units in that wallet count first.
The full answer
Both countries start from the same subtraction: what the XRP brought in, minus what it cost. They differ on which cost to use when XRP was bought in several lots. This page sets out the official rules as published by the Canada Revenue Agency (CRA) and the US Internal Revenue Service (IRS); it is not tax advice for any individual. Which events trigger tax at all is on whether you pay tax on XRP in Canada or the US.
How is the gain worked out in Canada?
The CRA says a capital gain arises when “the proceeds of disposition (usually the sale price of the crypto-asset) are more than your adjusted cost base (usually the cost of a crypto-asset, plus expenses to acquire it) and the outlays and expenses incurred to make the disposition.”[1] Its general capital gains page describes the adjusted cost base as “the cost of a property plus any expenses to acquire it, such as commissions and legal fees.”[2]
A swap counts at market value. In a CRA example, a holder “disposed of 2.5061 units of crypto-asset B in exchange for 100 units of crypto-asset A at a value of $20,600.” With an adjusted cost base of $15,000, the result is “$5,600 capital gain taxed at 50% = $2,800 taxable capital gain.”[1]
What about XRP bought at different prices in Canada?
This is where the CRA’s crypto pages stop. None of the CRA crypto pages read on September 29, 2026 explains how to set the cost of identical units bought at different prices. The CRA’s general page on special rules says that if you buy and sell several identical properties at different prices over a period of time, “you have to calculate the average cost of each property in the group at the time of each purchase to determine your adjusted cost base”.[9] It says the average cost is the total cost of the identical properties purchased, usually the cost plus any expenses involved in acquiring them, divided by the total number of identical properties owned.[9] The CRA’s own records list shows it expects the cost to be tracked: holders should keep “The beginning wallet balance (and its cost) and ending wallet balance for each crypto-asset for each year.”[3]
How is the gain worked out in the US?
The IRS says the gain or loss “will be the difference between your adjusted basis in the digital assets and your ‘amount realized’ on the sale.” The amount realized is “reduced by your digital asset transaction costs allocable to the disposition.”[4] On the buying side, the FAQ says basis in digital assets bought with cash “includes the amount you paid in cash for the digital assets plus the amount you paid for transaction services to effect the purchase.”[4] The costs “may include transaction and ‘gas’ fees, transfer taxes, and commissions,” but fees paid to move XRP “between your own wallets or accounts are not treated as digital asset transaction costs.”[4]
The holding period “begins on the day after you acquired the digital assets and ends on the day you sell or exchange them.”[4] A year or less gives a short-term result.
Which units count as sold in the US?
The holder can choose, within one wallet, if the choice is recorded in time. For self-custody wallets and sales on or after January 1, 2025, the IRS says “no later than the date and time of the sale,” the holder “must identify the particular units to be sold” on their own books, using an identifier “such as purchase date and time or the purchase price for the unit.”[4]
Without that record, the default applies. Units are treated as sold “in order of time from the earliest date on which units of the same digital asset in this wallet were acquired by you, regardless of the date on which any such units were transferred into the wallet.”[4] In practice this is first-in, first-out, counted inside each wallet.
At a broker the timing rule is stricter from 2026. For sales “after December 31, 2025,” the holder must “specify to the broker having custody of the units, no later than the date and time of sale,” which units are sold, “using the identifiers designated by your broker.”[4] For 2025 sales, temporary relief under Notice 2025-7 let holders record the choice on their own books, or by a standing order recorded in advance, instead.[4]
What changed on January 1, 2025, and January 1, 2026?
Before 2025, some holders treated all their wallets as one pool. The IRS calls this “the ‘universal’ or ‘multi-wallet’ approach.”[4] Its older virtual currency FAQs “generally apply to transactions involving digital assets completed before Jan. 1, 2025.”[6]
From January 1, 2025, basis follows each wallet. Rev. Proc. 2024-28 gave a safe harbor to “allocate unused basis of digital assets to digital assets held within each wallet or account of the taxpayer as of January 1, 2025.”[5]
Broker reporting of basis on certain sales began on January 1, 2026, on Form 1099-DA.[8] The form covers “proceeds from (and in some cases, basis for)” disposals, and the IRS says “You must calculate basis before you file your tax return.”[7]
What records are needed?
The CRA list includes “The date and time of each transaction,” “The value of the crypto-asset (in Canadian dollars) at the time of each transaction” and “The addresses associated with each digital wallet used.”[3] The IRS identification rules depend on records that show purchase dates and prices per wallet.[4] The full list is on what records to keep for crypto taxes.
Where do the two systems differ, and what is uncertain?
The US lets holders choose which lots were sold, so two holders with the same trades can report different gains depending on their records.[4] Canada ties the gain to an adjusted cost base,[1] and the CRA says that for identical properties bought at different prices you calculate the average cost of each property in the group at the time of each purchase.[9] The US wallet-by-wallet rule dates from January 1, 2025, and Rev. Proc. 2024-28 provided a safe harbor for allocating unused basis to the digital assets held in each wallet or account as of January 1, 2025.[5] Anyone with lots spread across exchanges and self-custody wallets faces the most record-keeping, and should check the current CRA or IRS pages, or a tax professional, before filing.
What we know
- On December 2, 2025, the CRA defined a capital gain as proceeds above the adjusted cost base (usually cost plus expenses to acquire) and the costs of disposing (CRA).
- On January 20, 2026, the CRA described the adjusted cost base as the cost of a property plus expenses to acquire it, such as commissions and legal fees (CRA).
- In its FAQ updated June 29, 2026, the IRS measures gain as amount realized, after allocable transaction costs, minus adjusted basis (IRS).
- For sales from a wallet on or after January 1, 2025, the IRS allows specific identification recorded by the time of sale; otherwise units count as sold from the earliest acquired in that wallet, per the same June 29, 2026 update (IRS).
- The IRS FAQ updated June 29, 2026 says basis in digital assets bought with cash includes the cash paid plus the fees paid to make the purchase (IRS).
- 2024: Rev. Proc. 2024-28 gave a safe harbor to allocate unused basis to each wallet or account as of January 1, 2025 (IRS).
- Broker-held units sold after December 31, 2025 must be identified to the broker by the time of sale, the IRS said in its June 29, 2026 update (IRS).
- In its page last reviewed June 28, 2026, the IRS says Form 1099-DA reports proceeds and only in some cases basis, and that taxpayers must calculate basis before filing (IRS).
- On February 5, 2026, the CRA page “Special rules and other transactions” said that if you buy and sell several identical properties at different prices over a period of time, you have to calculate the average cost of each property in the group at the time of each purchase to determine your adjusted cost base (CRA).
What we reason Analysis
- The same sale can produce different taxable gains in the two countries, because the US lets holders pick which units were sold while Canada ties the cost to the adjusted cost base. This follows from the IRS identification FAQs and the CRA adjusted cost base definition and average cost rule.
- Moving XRP between wallets can change which units a later US sale draws from, because the default order is set per wallet by original purchase date. This follows from IRS FAQs 86 and 87.
- A holder who relies on exchange statements alone will be missing basis for self-custody wallets and for pre-2026 broker sales. This follows from the IRS statement that basis is reported only on certain transactions from 2026, and from the CRA record list.
What's still open
- The CRA pages read on September 29, 2026 do not say whether a crypto-to-crypto swap fee is added to cost or deducted from proceeds.
In plain English
To find a profit on XRP you take what you got for it and subtract what it cost you, including fees. When XRP was bought in several batches at different prices, the question is which cost to use. In the US, a holder can choose which batch was sold if they record the choice by the time of the sale, and each wallet is tracked on its own; otherwise the oldest batch in that wallet counts first. Canada uses an adjusted cost base, and for identical units bought at different prices the CRA has you calculate the average cost of each unit at the time of each purchase.
Key terms
Sources
- Reporting income from crypto-asset transactions — Canada Revenue Agency, December 2, 2025 Primary
- Capital gains (deceased persons) — Canada Revenue Agency, January 20, 2026 Primary
- Keeping books and records of crypto-assets for tax filing — Canada Revenue Agency, November 10, 2025 Primary
- Frequently asked questions on digital asset transactions — US Internal Revenue Service, last reviewed June 29, 2026 Primary
- Revenue Procedure 2024-28 — US Internal Revenue Service, 2024 Primary
- Frequently asked questions on virtual currency transactions — US Internal Revenue Service, last reviewed June 30, 2026 Primary
- Understanding your Form 1099-DA — US Internal Revenue Service, last reviewed June 28, 2026 Primary
- Digital assets — US Internal Revenue Service, last reviewed September 2, 2026 Primary
- Special rules and other transactions — Canada Revenue Agency (Government of Canada), 2026-02-05 Primary
Update log
- — Published.
I keep this site free, with no ads, paywall or affiliate links; gifts cover hosting and research time. Support the project, or report an error.
