Beancount plugin for UK tax reporting

77 views
Skip to first unread message

Vasily M

unread,
Mar 30, 2025, 12:08:35 PMMar 30
to Beancount
Hi all,

I've finally cleaned up code I wrote for UK capital gains tax reporting: https://github.com/Evernight/beancount-plugin-tax-uk/.

The usual disclaimer: I'm not an accountant, tax specialist or a finance expert. Use this code for informational purposes and at your own risk and without any guarantees. More so, at this starting point it's more of an RFC since there are some test cases known not to be handled correctly. I'll fix at least some of them later. More generic simpler cases are expected to work though.

There have been some discussions here https://groups.google.com/g/beancount/c/F6rc8QgTNEY and in other places regarding average cost booking implementation which does not exist yet (as far as I know). The plugin, perhaps, does not implement it in the most native way, instead externalising all the calculations. However, it takes into account specific UK rules (S104, same day, bed&breakfast) that would have to be handled manually even if the average cost booking was implemented directly in Beancount, so it's better specifically for the UK in some ways.

Please take a look if this is something relevant for you, feel free to create an issue or contribute test cases and code.

Cheers,
Vasily

Vasily M

unread,
Dec 14, 2025, 3:04:41 PM (7 days ago) Dec 14
to Beancount
Bumping this since the upcoming tax return deadline is in a few weeks and maybe that would be useful to someone. If you already have investments tracked in Beancount, that hopefully shouldn't be too hard to set up for use with the plugin.
I borrowed test cases from other more established open source capital gains calculators. There are a couple small differences but they don't affect reported amounts or refer to a limited situation. These tests can also serve as examples and open easily in Fava. I guess I could add a couple more test sources but given limited interest and that it's really not the most exciting process to go through I have not done it so far :)
Reply all
Reply to author
Forward
0 new messages