How to track taxable ESPP discount

30 views
Skip to first unread message

Damien R.

unread,
Dec 12, 2025, 10:36:38 AM (9 days ago) Dec 12
to Beancount
Hello,

With $WORK, I have access to ESPP. The trick is that I'm located in Canada, where the ESPP discount in considered taxable income. So each buy event could look like this:

2025-12-01 * "ESPP Buy"
  ; the discount is taxed as income, so the cost basis is the FMV on the trade date
  Assets:Broker:WORK  10 WORK { 100 USD }
  Assets:Jobs:WORK:EsppFund  -(85 * 10) USD
  Income:Jobs:EsppDiscount  -(15 * 10) USD

The issue I have is related to my paycheck. This EsppDiscount is spread over the course of a few paychecks under "Employer Paid Benefits" as "ESPP Gain". For other Employer Paid Benefits, I usually have a Income leg and an expense leg:

2025-12-15 * "Paycheck"
  Income:Jobs:LifeInsurance -50 CAD
  Expenses:Jobs:LifeInsurance 50 CAD
  ; Here if I add an 'Income' leg, the income would be counted twice
  Expenses:Jobs:EsppGain 100 CAD


What I ended up doing is:

2025-12-01 * "ESPP Buy"
  Assets:Broker:WORK  10 WORK { 100 USD }
  Assets:Jobs:WORK:EsppFund  -(85 * 10) USD
  Liabilities:Jobs:EsppUntaxedGain  -((15 * 10) * 1.2) CAD @@ -(15 * 10) USD

2025-12-15 * "First paycheck with an ESPP Gain entry"
  Income:Jobs:EsppDiscount          -50 CAD
  Liabilities:Jobs:EsppUntaxedGain 50 CAD

; after a few paychecks, I need the pad directive to account for conversion imprecision
; the exchange rate in the buy event is from Bank of Canada, it's not the one the broker/my employer uses
2026-02-28 pad Liabilities:Jobs:EsppUntaxedGain Equity:Conversion
2026-02-28 balance Liabilities:Jobs:EsppUntaxedGain 0 CAD

This lets me track the EsppDiscount in CAD, which is what I need at the end of the day for my tax report.

Is this an okay way to book these transactions?

Cheers,
-- 
Damien

Timothy Jesionowski

unread,
Dec 12, 2025, 6:35:22 PM (9 days ago) Dec 12
to bean...@googlegroups.com
Anything that leaves you with the right cost basis and puts the income in the right spot works. I have a similar situation and had one transaction buy it at the discounted cost basis, another debit (subtract) the stock units at the discounted price then credit (add) them at FMV while accounting the difference to my Income:WORK:Benefits account. And a third for when I sold them accounting the difference between that price and the FMV purchase price to my P&L.

That sounds complicated, but it seemed cleanest to me. I'll send you the redacted transactions if I ever get to my laptop.



Sincerely,
Timothy Jesionowski

--
You received this message because you are subscribed to the Google Groups "Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beancount+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/beancount/160b0057-0e70-462a-b6d9-154d0d2973f0n%40googlegroups.com.

Timothy Jesionowski

unread,
Dec 12, 2025, 8:55:20 PM (8 days ago) Dec 12
to bean...@googlegroups.com
Numbers are made up, but the syntax is correct:

2025-06-30 open Assets:Brokerage:ESPP:Q2-2025:ACME ACME

2025-06-30 txn "ESPP share purchase" ""
  Assets:Brokerage:ESPP:Q2-2025:ACME      20 ACME {400.88 USD, 2025-06-30}
  Assets:Brokerage:ESPP

2025-06-30 * "ESPP share discount" ""
  Assets:Brokerage:ESPP:Q2-2025:ACME     -20 ACME {400.88 USD, 2025-06-30}
  Assets:Brokerage:ESPP:Q2-2025:ACME      20 ACME {448.80 USD, 2025-06-30}
  Income:Acme:Benefits

2025-07-07 * "Selling Acme Shares" ""
  confirmation_number: "ABCXYZ876543"
  Assets:Brokerage:ESPP:Q2-2025:ACME     -20 ACME {448.80 USD, 2025-06-30} @ 450.22 USD
  Expenses:Fees                                15.00 USD
  Assets:Brokerage:ESPP:Q2-2025              8989.40 USD
  Income:Brokerage:Capital-Gains

2025-07-08 close Assets:Brokerage:ESPP:Q2-2025:ACME



Sincerely,
Timothy Jesionowski

Damien R.

unread,
Dec 16, 2025, 2:09:55 PM (5 days ago) Dec 16
to Beancount
Thanks for the answer. I think I'll keep it my way as on top of that I need to compute the Adjusted Cost Base (ACB) to declare capital gains, so I should either have a way to let my script ignore some transactions, or I just avoid "virtual" transactions altogether. From an ACB point of view I get 20 ACME at 448.80, and from an income point of view I get an extra 20 * 40 USD at some point in the year.

Cheers,
Damien
Reply all
Reply to author
Forward
0 new messages