Introduction
Restricted Stock Units (RSUs) are a common part of compensation packages in tech and other industries. They can represent a significant portion of your income—but they also introduce complexity to your personal finances. RSUs vest over time, are subject to income taxes when they vest, and may later be sold, triggering capital gains.
If you’re already using Beancount to track your finances, it’s worth bringing your RSUs into the ledger. In this post, we’ll walk through how to record RSUs in Beancount in a way that keeps your records clean, auditable, and tax-ready.
The Beancount example in this post can be found in: https://github.com/flyaway1217/beancount_example/blob/main/single_examples/RSU.bean
RSU Lifecycle Overview
Before jumping into the Beancount syntax, let’s briefly review how RSUs work:
- Grant Date: You’re promised a certain number of shares—typically recorded only as a memo at this point.
- Vesting Date: The shares legally become yours. The market value is treated as ordinary income, and income tax is due.
- Settlement: The shares are deposited into your brokerage account. Sometimes taxes are withheld by selling a portion of the vested shares.
- Sale: You sell the shares. Any additional gain (or loss) from the time of vesting to sale is treated as a capital gain or loss.
Beancount lets you model this lifecycle clearly using plain-text journal entries.
Required Accounts
As usual, we need to define some commodities and accounts.
First we need to define two commodities:
|
|
AMZN
is the actual stocks shares we received and AMZN.UNVEST
represents the
shares that have not vested yet.
Next, we define the Asset accounts:
|
|
The first two Asset accounts are used to hold the vested and unvested stock shares. The third one is an intermediate account, serves as a help account to move stocks from unvested to vested state. We will see how to use this account in the later part of this post. The last asset account is the designated account that to receive any leftover cash after paying taxes.
We also need to define some necessary Income and Expenses accounts. Since the award is part of the compensation, which accounts as an income. We use an Income account to track the unvested shares we received. When vesting, we use an Expenses account to track the total vested shares over the time.
|
|
Step-by-Step Recording
Now, let’s start tracking the RSUs!
Granting RSUs
When receiving an award, we record it as an income:
|
|
This is a simple transaction that logs the awards as an Income.
Vesting
When vesting, the broker firm that administrates your RSU takes the following actions:
- Use the current market stock price to compute the total value you received. This accounts as the Income you received.
- Based on the total income value, taxes is computed.
- Then the firm will sell necessary shares using the market price to cover these taxes.
- The remaining shares will be deposited into your personal account. Until this point, the shares (after selling for taxes) you received officially becomes yours.
- Deposits any leftover cash (after tax withholding) into your designated bank account.
To reflect the above events properly in Beancount, we divide the process into two steps:
- First, we receive an income in the form of cash. This is a taxable event.
- Second, we convert the cash into the stock shares.
Taxable Income Event
To record the taxable income, we treat it like a normal salary:
|
|
In the above example, we received 39,934.22 dollars as regular income, which is the total market value of vested stock shares. We also pay income taxes. We record them as expenses. Then, the remaining cash is deposited my bank account and intermediate account. The 104.92 dollars is the leftover after selling some stocks and paying the taxes. These cash will be deposited into your bank account in cash.
Convert into Your Stocks
Next, we need to convert the cash value in
Assets:Others:RSURefund:Xiaowan:Amazon
because ultimately we received the
income in the form of stocks.
|
|
In the above example, we vested 153 shares AMZN stocks into our private stock
account with the market price of 181.52 dollars, resulting the total value of
27,777.72 dollars, which is exactly the same amount in the account
Assets:Others:RSURefund:Amazon
. Also, in this transaction, we need to pay
some transaction fees. The last two lines record the real stocks shares vested:
we in total vested 220 shares, but 67 shares of them are sold to pay for the
taxes, the remaining 153 shares are deposited into our private stock account.
This information can be found in your broker statement.
Why Two Steps
Using a two-step accounting approach:
- First, receive the income as cash, triggering the tax event.
- Then, convert the cash into actual stocks.
This method makes it easier to manage the taxable event and cost basis of the stocks. Trying to log both in a single transaction would complicate the ledger and make audit trails harder to follow.
Tips and Best Practices
Use Subaccount to Track Different Awards
Most tech companies grant RSUs yearly, with vesting schedules spanning several years. This means you’ll likely have multiple active awards at once. It’s helpful to use subaccounts to distinguish them:
|
|
Where RS2821149
and RS3118736
are the award number provided by your company
or broker firms. You can use any identifier you want.
Asserting the Intermediate Account
|
|
The intermediate account shouldn’t retain any funds—its balance should go to zero after each conversion. It’s good practice to include assertions like the one above to verify this and catch bookkeeping errors early.
Final Thoughts
RSUs are a powerful form of compensation, but they come with a web of tax implications and tracking challenges. By bringing them into your Beancount ledger, you gain full visibility over your awards, vesting schedules, and eventual capital gains. More importantly, you create an auditable record that makes tax reporting easier and reduces surprises during filing season.
While this post provides a general framework, feel free to tailor the account structure or add metadata to suit your workflow. And remember—keeping detailed records isn’t just about taxes; it’s also about understanding the real value of what you’ve earned.
As always, consistency in how you record RSU events will pay off in clarity and peace of mind down the road.