Skip to content

Canadian ACB Formulas

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.


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.


At the start of calculations:

Cumulative Quantity = 0
Cumulative ACB = 0
Average 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 Quantity
New Cumulative ACB = Previous ACB + Total Cost of Acquisition
New Average Cost = New Cumulative ACB ÷ New Cumulative Quantity

Total Cost of Acquisition:

Total Cost = (Quantity × Price) + Fees

Example:

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/BTC

Critical: Cost basis is calculated using the average cost BEFORE the disposal.

Step 1: Calculate proceeds

Proceeds = (Quantity Sold × Sale Price) - Fees

Step 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 Disposed

Step 4: Check superficial loss rule (see below)

Step 5: Update cumulative values

New Cumulative Quantity = Previous Quantity - Quantity Sold
New Cumulative ACB = Previous ACB - Cost Basis Disposed [+ Superficial Loss Adjustment]
New Average Cost = New Cumulative ACB ÷ New Cumulative Quantity

Example (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/BTC

CRA Requirement: Mandatory for all taxpayers (cannot be disabled)

Definition: A loss is superficial if:

  1. Disposition results in a loss
  2. You acquire identical property within the 61-day window (30 days before + day of sale + 30 days after the disposition)
  3. You still own the property 30 days after the disposition

61-Day Window:

Window Start = Disposal Date - 30 days
Window End = Disposal Date + 30 days

Ownership Check:

Position at (Disposal Date + 30 days) > 0

Rule Applies:

Superficial Loss Applies = (Capital Gain < 0)
AND (Repurchases within 61-day window > 0)
AND (Position at day 30 after disposal > 0)

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 window
B = 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) ÷ S

Denied Loss:

Denied Loss = |Raw Capital Loss| × Proration Ratio

Allowed Loss:

Allowed Loss = |Raw Capital Loss| - Denied Loss

Adjusted Capital Gain:

Adjusted Capital Gain = -Allowed Loss

(Negative value indicates a loss)

ACB Adjustment:

New Cumulative ACB = (Previous ACB - Cost Basis Disposed) + Denied Loss

The denied loss is added back to ACB, deferring it to future disposals.


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/BTC

Result: 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).


PrivateACB performs mathematical validation at each step to ensure accuracy:

ACB Continuity Check:

Expected Average Cost = Cumulative ACB ÷ Cumulative Quantity
Tolerance = 0.0001
IF |Calculated Average Cost - Expected Average Cost| > Tolerance THEN
THROW ERROR "ACB calculation drift detected"
END IF

Negative Inventory Check:

IF Cumulative Quantity < 0 AND |Cumulative Quantity| > 0.00000001 THEN
THROW ERROR "Negative quantity detected"
END IF

Negative ACB Check:

IF Cumulative ACB < 0 AND |Cumulative ACB| > 0.01 THEN
THROW ERROR "Negative ACB detected"
END IF

For each disposal transaction:

Proceeds of Disposition:

Proceeds = (Quantity × Sale Price) - Fees

Adjusted 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 - ACB

Taxable 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 Losses
Taxable 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 31

Gain/Loss (if required):

Gain/Loss = (Year-End Market Value) - (Year-End Cost)

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 Losses
Superficial 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

Critical: Transactions must be processed in strict chronological order.

  1. Sort all transactions by timestamp (ascending)
  2. Initialize cumulative values to zero
  3. 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
  4. Validate mathematical continuity
  5. Generate capital gains records
  6. Calculate report totals

When transactions are in USD (or other non-CAD currencies):

Converted Amount:

CAD Amount = USD Amount × Exchange Rate for transaction date

Example:

Buy 1 BTC @ $10,000 USD on Jan 1, 2024
Exchange Rate (USD/CAD) on Jan 1, 2024 = 1.3500
Total Cost in CAD = $10,000 USD × 1.3500 = $13,500 CAD

All ACB calculations use CAD amounts. The average cost, cumulative ACB, and capital gains are all in CAD.


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 IF

Superficial loss with partial repurchase:

Sell 100 BTC (loss)
Repurchase 30 BTC within 61-day window
Still 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 ACB

If multiple acquisitions occur within the 61-day window:

Jan 15: Sell 100 BTC (loss)
Jan 20: Buy 20 BTC
Jan 25: Buy 30 BTC
Feb 10: Buy 50 BTC
Feb 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)

If you only buy and never sell:

ACB continues to accumulate
Average Cost = total spent ÷ total units
No capital gains/losses to report
No superficial loss rule applies (no disposals)

Report on T1135 if holdings exceed $100,000 CAD.


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

To manually verify an ACB calculation:

  1. Obtain transaction list (sorted chronologically)
  2. Start with zero values:
    • Quantity = 0, ACB = 0
  3. For each transaction:
    • Apply acquisition or disposal formulas
    • Calculate new quantity, new ACB, new average cost
    • Check for superficial losses if disposal with loss
  4. 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

CRA Publications:

Income Tax Act:

  • Section 54 (definition of “superficial loss”)
  • Subsection 40(2)(g) (superficial loss denial)
  • Subsection 53(1) (ACB increases)

Key Formulas:

Acquisition:

New ACB = Old ACB + (Quantity × Price + Fees)
New Average Cost = New ACB ÷ New Quantity

Disposal:

Cost Basis = Quantity × Average Cost (before sale)
Capital Gain = Proceeds - Cost Basis

Superficial Loss (CRA Formula):

S = Shares sold
P = Shares purchased within 61-day window
B = Shares held at end of period (30 days after disposal)
Proration Ratio = MIN(S, P, B) ÷ S
Denied Loss = |Loss| × Proration Ratio
ACB Adjustment = +Denied Loss

Schedule 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)