Canadian ACB Formulas
Overview
Section titled “Overview”This technical guide documents the mathematical formulas and calculation processes used by PrivateACB for Canadian Adjusted Cost Base (ACB) calculations. This is a companion document to the Canadian ACB Calculation User Guide.
Audience: Users who want to understand the mathematics behind ACB calculations, verify results manually, or understand how PrivateACB implements CRA rules.
Scope: Formulas, equations, and calculation processes. For step-by-step usage instructions, see the user guide.
CRA Methodology
Section titled “CRA Methodology”Required Method: Average Cost Basis (ACB) Tax Authority: Canada Revenue Agency (CRA) Regulatory Framework: Income Tax Act, CRA Schedule 3, T1135
Key Principle: All units of the same cryptocurrency are pooled together and tracked using a weighted average cost.
Core ACB Formulas
Section titled “Core ACB Formulas”1. Initial State
Section titled “1. Initial State”At the start of calculations:
Cumulative Quantity = 0Cumulative ACB = 0Average Cost per Unit = undefined (no holdings)2. Acquisition (Buy, Reward, Mining, Staking, Airdrop)
Section titled “2. Acquisition (Buy, Reward, Mining, Staking, Airdrop)”When you acquire cryptocurrency:
New Cumulative Quantity = Previous Quantity + Acquired QuantityNew Cumulative ACB = Previous ACB + Total Cost of AcquisitionNew Average Cost = New Cumulative ACB ÷ New Cumulative QuantityTotal Cost of Acquisition:
Total Cost = (Quantity × Price) + FeesExample:
Initial state: 0 BTC, ACB = $0
Transaction 1: Buy 1 BTC @ $10,000, fees $50 Total Cost = (1 × 10,000) + 50 = $10,050 Cumulative Quantity = 0 + 1 = 1 BTC Cumulative ACB = $0 + $10,050 = $10,050 Average Cost = $10,050 ÷ 1 = $10,050/BTC
Transaction 2: Buy 1 BTC @ $20,000, fees $100 Total Cost = (1 × 20,000) + 100 = $20,100 Cumulative Quantity = 1 + 1 = 2 BTC Cumulative ACB = $10,050 + $20,100 = $30,150 Average Cost = $30,150 ÷ 2 = $15,075/BTC3. Disposal (Sell, Trade)
Section titled “3. Disposal (Sell, Trade)”Critical: Cost basis is calculated using the average cost BEFORE the disposal.
Step 1: Calculate proceeds
Proceeds = (Quantity Sold × Sale Price) - FeesStep 2: Calculate cost basis
Cost Basis Disposed = Quantity Sold × Average Cost (before sale)Step 3: Calculate raw capital gain
Raw Capital Gain = Proceeds - Cost Basis DisposedStep 4: Check superficial loss rule (see below)
Step 5: Update cumulative values
New Cumulative Quantity = Previous Quantity - Quantity SoldNew Cumulative ACB = Previous ACB - Cost Basis Disposed [+ Superficial Loss Adjustment]New Average Cost = New Cumulative ACB ÷ New Cumulative QuantityExample (no superficial loss):
Current state: 2 BTC, ACB = $30,150, Average Cost = $15,075/BTC
Transaction 3: Sell 1 BTC @ $25,000, fees $125 Proceeds = (1 × 25,000) - 125 = $24,875 Cost Basis = 1 × $15,075 = $15,075 Capital Gain = $24,875 - $15,075 = $9,800
New Quantity = 2 - 1 = 1 BTC New ACB = $30,150 - $15,075 = $15,075 New Average Cost = $15,075 ÷ 1 = $15,075/BTCSuperficial Loss Rule (Mandatory)
Section titled “Superficial Loss Rule (Mandatory)”CRA Requirement: Mandatory for all taxpayers (cannot be disabled)
Definition: A loss is superficial if:
- Disposition results in a loss
- You acquire identical property within the 61-day window (30 days before + day of sale + 30 days after the disposition)
- You still own the property 30 days after the disposition
Detection Formula
Section titled “Detection Formula”61-Day Window:
Window Start = Disposal Date - 30 daysWindow End = Disposal Date + 30 daysOwnership Check:
Position at (Disposal Date + 30 days) > 0Rule Applies:
Superficial Loss Applies = (Capital Gain < 0) AND (Repurchases within 61-day window > 0) AND (Position at day 30 after disposal > 0)CRA Proration Formula
Section titled “CRA Proration Formula”Key Difference from US: Canadian rule uses proration based on the CRA formula with three parameters.
CRA Formula Parameters:
S = Shares disposed of (sold)P = Shares purchased within the 61-day windowB = Shares owned at the end of the 61-day period (30 days after disposal)Proration Ratio (Official CRA Formula):
Proration Ratio = MIN(S, P, B) ÷ SDenied Loss:
Denied Loss = |Raw Capital Loss| × Proration RatioAllowed Loss:
Allowed Loss = |Raw Capital Loss| - Denied LossAdjusted Capital Gain:
Adjusted Capital Gain = -Allowed Loss(Negative value indicates a loss)
ACB Adjustment:
New Cumulative ACB = (Previous ACB - Cost Basis Disposed) + Denied LossThe denied loss is added back to ACB, deferring it to future disposals.
Superficial Loss Example
Section titled “Superficial Loss Example”Initial state: 100 BTC, ACB = $1,000,000, Average Cost = $10,000/BTC
Jan 15: Sell 100 BTC @ $5,000/BTC, fees $250 Proceeds = (100 × 5,000) - 250 = $499,750 Cost Basis = 100 × $10,000 = $1,000,000 Raw Capital Loss = $1,000,000 - $499,750 = $500,250
New Quantity (before adjustment) = 0 BTC New ACB (before adjustment) = $0
Jan 20: Buy 50 BTC @ $4,000/BTC (within 61-day window) Total Cost = 50 × 4,000 = $200,000 Quantity = 50 BTC
Feb 14 (30 days after Jan 15): Position = 50 BTC > 0 ✓
SUPERFICIAL LOSS DETECTED - Apply CRA Formula: S (sold) = 100 BTC P (purchased in 61-day window) = 50 BTC B (held at end of period) = 50 BTC
Proration Ratio = MIN(S, P, B) ÷ S = MIN(100, 50, 50) ÷ 100 = 50 ÷ 100 = 0.5 (50%)
Denied Loss = $500,250 × 0.5 = $250,125 Allowed Loss = $500,250 - $250,125 = $250,125
Adjusted Capital Gain = -$250,125 (reportable loss)
ACB ADJUSTMENT (applied to Jan 15 disposal): New ACB after Jan 15 = $0 + $250,125 = $250,125
AFTER JAN 20 PURCHASE: Cumulative Quantity = 50 BTC Cumulative ACB = $250,125 + $200,000 = $450,125 Average Cost = $450,125 ÷ 50 = $9,002.50/BTCResult: You can claim $250,125 loss in the current year. The remaining $250,125 is deferred and embedded in your ACB (average cost increased from $4,000 to $9,002.50).
Mathematical Validation
Section titled “Mathematical Validation”PrivateACB performs mathematical validation at each step to ensure accuracy:
ACB Continuity Check:
Expected Average Cost = Cumulative ACB ÷ Cumulative QuantityTolerance = 0.0001
IF |Calculated Average Cost - Expected Average Cost| > Tolerance THEN THROW ERROR "ACB calculation drift detected"END IFNegative Inventory Check:
IF Cumulative Quantity < 0 AND |Cumulative Quantity| > 0.00000001 THEN THROW ERROR "Negative quantity detected"END IFNegative ACB Check:
IF Cumulative ACB < 0 AND |Cumulative ACB| > 0.01 THEN THROW ERROR "Negative ACB detected"END IFReport Value Calculations
Section titled “Report Value Calculations”Schedule 3 (Capital Gains and Losses)
Section titled “Schedule 3 (Capital Gains and Losses)”For each disposal transaction:
Proceeds of Disposition:
Proceeds = (Quantity × Sale Price) - FeesAdjusted Cost Base:
ACB = Quantity × Average Cost (before sale) [+ Superficial Loss Adjustment if applicable]Outlays and Expenses:
Outlays = Fees (already subtracted from Proceeds, shown separately for CRA reporting)Capital Gain/Loss:
Gain/Loss = Proceeds - ACBTaxable Capital Gain:
Taxable Gain = Capital Gain × 0.5 (if Gain > 0) = 0 (if Gain ≤ 0, losses not halved)Summary Totals:
Total Capital Gains = SUM(all gains where Gain > 0)Total Capital Losses = SUM(all gains where Gain < 0)Net Capital Gain/Loss = Total Gains + Total LossesTaxable Amount = Net Capital Gain × 0.5 (if Net > 0) = Net Capital Gain (if Net < 0, full loss deductible)T1135 (Foreign Income Verification Statement)
Section titled “T1135 (Foreign Income Verification Statement)”Required if foreign property holdings exceed CAD $100,000.
Maximum Cost:
Maximum Cost = MAX(Cumulative ACB during the year)Year-End Cost:
Year-End Cost = Cumulative ACB on December 31Gain/Loss (if required):
Gain/Loss = (Year-End Market Value) - (Year-End Cost)Tax Efficiency Metric
Section titled “Tax Efficiency Metric”PrivateACB calculates a tax efficiency score:
Total Gains = SUM(all positive capital gains)Total Losses = |SUM(all negative capital gains)|Net Gains = Total Gains - Total LossesSuperficial Losses Deferred = SUM(all denied loss amounts)
Tax Efficiency = (Total Losses - Superficial Losses Deferred) ÷ Total Losses × 100%Interpretation:
- 80-100%: Excellent - most losses are immediately deductible
- 60-79%: Good - some losses deferred
- 40-59%: Fair - significant superficial loss impact
- <40%: Poor - frequent repurchases triggering superficial losses
Processing Order
Section titled “Processing Order”Critical: Transactions must be processed in strict chronological order.
- Sort all transactions by timestamp (ascending)
- Initialize cumulative values to zero
- For each transaction (in order):
- If acquisition: Update ACB using acquisition formulas
- If disposal:
- Calculate capital gain using pre-disposal average cost
- Check superficial loss rule
- Apply adjustments if rule triggered
- Update ACB
- Validate mathematical continuity
- Generate capital gains records
- Calculate report totals
Currency Conversion
Section titled “Currency Conversion”When transactions are in USD (or other non-CAD currencies):
Converted Amount:
CAD Amount = USD Amount × Exchange Rate for transaction dateExample:
Buy 1 BTC @ $10,000 USD on Jan 1, 2024Exchange Rate (USD/CAD) on Jan 1, 2024 = 1.3500
Total Cost in CAD = $10,000 USD × 1.3500 = $13,500 CADAll ACB calculations use CAD amounts. The average cost, cumulative ACB, and capital gains are all in CAD.
Edge Cases
Section titled “Edge Cases”Zero Holdings
Section titled “Zero Holdings”When cumulative quantity reaches exactly zero:
IF Cumulative Quantity = 0 THEN Cumulative ACB = 0 Average Cost = undefined First Acquisition Date = reset (next acquisition sets new date)END IFPartial Disposal
Section titled “Partial Disposal”Superficial loss with partial repurchase:
Sell 100 BTC (loss)Repurchase 30 BTC within 61-day windowStill own 30 BTC at end of period (day 30 after disposal)
CRA Formula: MIN(S, P, B) ÷ S S (sold) = 100 BTC P (purchased in window) = 30 BTC B (held at end) = 30 BTC
Proration = MIN(100, 30, 30) ÷ 100 = 30 ÷ 100 = 30%70% of loss is allowed (reportable this year)30% of loss is denied and added to ACBMultiple Repurchases
Section titled “Multiple Repurchases”If multiple acquisitions occur within the 61-day window:
Jan 15: Sell 100 BTC (loss)Jan 20: Buy 20 BTCJan 25: Buy 30 BTCFeb 10: Buy 50 BTCFeb 14 (30 days after Jan 15): Still hold 100 BTC
CRA Formula: MIN(S, P, B) ÷ S S (sold) = 100 BTC P (purchased in 61-day window) = 20 + 30 + 50 = 100 BTC B (held at end of period) = 100 BTC
Proration = MIN(100, 100, 100) ÷ 100 = 100 ÷ 100 = 100%100% of loss is denied (full superficial loss)Acquisitions Only (No Disposals)
Section titled “Acquisitions Only (No Disposals)”If you only buy and never sell:
ACB continues to accumulateAverage Cost = total spent ÷ total unitsNo capital gains/losses to reportNo superficial loss rule applies (no disposals)Report on T1135 if holdings exceed $100,000 CAD.
Database Storage
Section titled “Database Storage”PrivateACB stores calculation results in structured database tables:
acb_records table:
- One record per transaction
- Stores: cumulative_quantity, cumulative_acb, average_cost, cost_basis_per_unit
- cost_basis_per_unit = average cost BEFORE the transaction (critical for disposals)
capital_gains table:
- One record per disposal
- Stores: proceeds, cost_basis, capital_gain, superficial_loss_applied (0 or 1)
- If superficial_loss_applied = 1, capital_gain is the ADJUSTED value
superficial_losses table:
- One record per detected superficial loss
- Stores: loss_amount, is_denied, added_to_acb
- Links to original disposal and repurchase transactions
Verification Process
Section titled “Verification Process”To manually verify an ACB calculation:
- Obtain transaction list (sorted chronologically)
- Start with zero values:
- Quantity = 0, ACB = 0
- For each transaction:
- Apply acquisition or disposal formulas
- Calculate new quantity, new ACB, new average cost
- Check for superficial losses if disposal with loss
- Compare results to PrivateACB output:
- Final ACB should match
- Final quantity should match
- Capital gains should match (after superficial loss adjustments)
If discrepancy found:
- Check transaction order (must be chronological)
- Verify fees are included in acquisition costs
- Verify fees are subtracted from proceeds (disposals)
- Check superficial loss detection (61-day window, ownership at day 30 after disposal)
- Verify CRA proration formula: MIN(S, P, B) ÷ S
Regulatory References
Section titled “Regulatory References”CRA Publications:
Income Tax Act:
- Section 54 (definition of “superficial loss”)
- Subsection 40(2)(g) (superficial loss denial)
- Subsection 53(1) (ACB increases)
Summary
Section titled “Summary”Key Formulas:
Acquisition:
New ACB = Old ACB + (Quantity × Price + Fees)New Average Cost = New ACB ÷ New QuantityDisposal:
Cost Basis = Quantity × Average Cost (before sale)Capital Gain = Proceeds - Cost BasisSuperficial Loss (CRA Formula):
S = Shares soldP = Shares purchased within 61-day windowB = Shares held at end of period (30 days after disposal)
Proration Ratio = MIN(S, P, B) ÷ SDenied Loss = |Loss| × Proration RatioACB Adjustment = +Denied LossSchedule 3 Taxable Amount:
Taxable Capital Gain = Net Capital Gain × 0.5 (if positive)For procedural instructions, see: Canadian ACB Calculation User Guide For a user-friendly explanation of the superficial loss rule, see: Superficial Loss Rules
Last Updated: February 2026 PrivateACB Version: 2.0 Regulatory Authority: Canada Revenue Agency (CRA)