Tax Season and Technology

2026-01-18

Every year around this time, I have to file a tax return which (more or less) specifies all my income, all my deductions, and the tax that was deducted at source already. The process that I use for this is to convert my GnuCash accounts book into a Ledger file, and then use Ledger for verifying the various amounts. I like GnuCash because it has an intuitive user interface, that I have gotten quite comfortable with over the years. I like Ledger because it is a command line tool that I can use to create “repeatable” commands.

For instance, this command in Ledger gives me a total for the Income tax that has already been deducted from all my income this year:

$ hledger --file book.dat bal --begin 2025-01-01 --end 2026-01-01 'Taxes:Income tax'

The output of this command did not match initially. I was not exactly sure why. My guess was that the difference was due to a single transaction. So, I calculated the difference (Say: 2178) and then, I used ripgrep to search the text file:

$ rg -C5 2178 book.dat

This pointed me towards a single transaction that matched this amount. If there were multiple results, or no results, I could ask hledger to output the Income tax deduction on a monthly basis, and eyeball the result for anomalies.

Now, the conversion to Ledger for analysis is not necessarily a requirement. In fact, GnuCash has the Reports feature which can be used quite effectively for this purpose. Beware though, because the Report configuration is not stored as part of a GnuCash file, or anywhere that I know of which can be stored in a backup somewhere. So, every time that I update my computer or re-install the operating system, I lose all my existing reports configuration, which is a shame.