One Number I Trust: Plain-Text Accounting for a Multi-Currency Household
Key topics
The intricacies of double-entry bookkeeping have sparked a lively debate, with many commenters weighing in on its benefits and applications, particularly in the context of plain-text accounting for a multi-currency household. As one commenter astutely pointed out, double-entry bookkeeping serves as a robust system for tracking the source and destination of funds, making it easier to spot mistakes and audit transactions. Some contributors, like RedNifre, broke down the concept into digestible bits, explaining it in terms relatable to "software people who understand databases." The discussion also delved into modeling investments, such as index funds, with commenters like thehours and rmunn exploring how to represent fluctuating asset values within the double-entry framework.
Snapshot generated from the HN discussion
Discussion Activity
Very active discussionFirst comment
2h
Peak period
58
0-6h
Avg / period
9.2
Based on 92 loaded comments
Key moments
- 01Story posted
Jan 2, 2026 at 5:25 AM EST
9 days ago
Step 01 - 02First comment
Jan 2, 2026 at 7:39 AM EST
2h after posting
Step 02 - 03Peak activity
58 comments in 0-6h
Hottest window of the conversation
Step 03 - 04Latest activity
Jan 5, 2026 at 6:19 AM EST
5d ago
Step 04
Generating AI Summary...
Analyzing up to 500 comments to identify key contributors and discussion patterns
Want the full context?
Jump to the original sources
Read the primary article or dive into the live Hacker News thread when you're ready.
2. For performance, you would create indices based on the accounts in the transaction table, so you could easily check what's going on e.g. in your groceries account or how much you spent at the supermarket.
3. Double entry accounting was formalized in the 15th century, way before computers became a thing, but bound paper books were already somewhat affordable. The way you'd do accounting is like this: During the business day, you would write down your transactions as they happen, into a scrapbook, similar to the transactions table mentioned above. At the end of the day, you'd do the "double entry" part, which means you take your "index" books where each book is about one account and you transcribe each transaction from your scrap book into the two books of the two accounts that are mentioned in the transaction, e.g. if you spent $10 from your groceries account into the supermarket account, you'd double enter that transaction both into your "groceries" book and into your "supermarket" book. Then, when you want to check on how much you spent at the supermarket in a particular month, you could easily look it up in the supermarket book (this would be very tedious when using the scrap book). These account centered books are like the indices in the database mentioned above.
So the double entry part is about clever index building for making it easier and faster to understand what's going on in your accounting system.
So you record two entries:
January 1st, 2025:
-$100 checking account +5 shares VFINX at $20 ea
January 1st, 2026:
-5 shares VFINX at $22 ea +$110 checking account
At this point you have "realized" ("made real") $10 of profit from this asset. You bought it for $100 and sold it for $110, so the IRS wants you to pay taxes on the $10 profit you made. (This is capital gains tax). Until you sold them, some people would consider you to have $10 profit in "unrealized capital gains", but you did not actually have that profit until you sold the shares. This is important to remember, because if you start counting on that $10 profit but then the share price drops because the economy took a hit, suddenly you don't have $110 worth of shares, you have $90 worth of shares, and you'll make a loss if you sell them now. (This is one of the reasons why only the economically illiterate would propose a tax on "unrealized capital gains": that means taxing people for income they have not actually received, but merely could theoretically receive. Which is both immoral and stupid.)
Hope this explanation helps a little. And as I said, if I got something wrong, please correct me and explain how I was wrong; I'm not an accountant. I understand the basic principles, but it's entirely possible I was off on some detail or other.
And in fact, he could never actually make that amount of money by selling all his shares, because if he did put 200 million MegaSoft shares on the market, he'd never be able to find buyers for all of them at the current share price, and he'd be forced to drop his asking price by quite a bit before he managed to sell all 200 million shares. Not to mention the fact that if he tried to sell his entire holdings of MegaSoft Corp, many people would wonder what he knows about MegaSoft's long-term prospects, and would be afraid to buy those shares, driving the share price down even further. Gill Bates would be lucky to make $5 billion, let alone his theoretical net worth of $20 billion, if he were to suddenly sell all his shares. (If he sold them in a trickle over the course of ten years, he might well make the full $20 billion in the end, but not if he dumped them all on the market at once).
This is why (well, it's just one of the many reasons why) net worth is misleading. It's a theoretical number, but the actual amount of wealth someone has in practice entirely depends on market conditions at the moment they need the money, as well as how urgently they need it. (If the market is low right now, can they afford to wait six months for it to recover? Or do they need the money tomorrow and have to sell at a lower-than-ideal price?)
For very rich people like Gill Bates, net worth is going to be the denominator for massive loans, tax strategies, and corporate maneuvering. Again, none of that will require converting the entire net worth to cash all at once. That doesn’t mean it’s not real.
Finance is a complex subject, sure, and it gets more complex the bigger the numbers. That doesn’t mean it’s misleading.
But your statement misses the important point of situations where people use the unrealized gains as collateral for a loan which they then use (for example to live off of). This in fact effectively "realizing" them without paying appropriate taxes on them. As long as gains are purely theoretical and not used for any transactions they should remain untaxed. As soon as they become "active" by being sold, or for example in unlocking additional assets by being collateral for a loan, they should be taxed.
Same concept as a retirement account. You can sell within a retirement account and rightfully don't have to pay taxes because you don't really have "access" to the cash. It's still "locked" within the account. Only when you withdraw to have access to it and make it active/real do you pay taxes. But if you take out a large loan leveraging that retirement account as collateral (or against an unrealized gain) you are not making it active and correctly should pay taxes.
As for retirement accounts, same principle applies. Collateral is collateral, it's a contingency. It might or might not ever be touched. If it's touched, then there will be real income involved. If it isn't touched, then there was no income.
But as for the idea of paying taxes on things used as collateral for a loan, that only makes sense if you consider money received as a loan as income. And if you do, you're going to get yourself in serious trouble. LOANS ARE NOT INCOME. They have to be repaid, and they actually cost you money in the long term because you also have to pay interest. If you treat loans as if they were income, you'll quickly find yourself neck-deep in credit card debt and in serious financial trouble. On the other side of the equation, if the IRS were to treat loans as if they were income and tax them (or the collateral used to secure the loan), they would do immense damage to the economy.
Lalit describes this I think really well in his article
https://lalitm.com/post/one-number-i-trust/#chapter-4-invest...
To explain that, I'll rephrase, in my own words, the restaurant example from the article, because that was a good example of the concept. Let's say you went to a restaurant with two friends and decided to split the $90 bill three ways, but your friends didn't have $30 in cash on them at the time. You put the whole $90 on your credit card, and your friends paid you back $30 each the next week: one on Monday, and one on Wednesday.
In single-entry accounting you might have written the following transactions:
Thursday Jan 1st: $90 restaurant (credit card) Monday Jan 5th: $30 repaid from Alice (cash) Wednesday Jan 7th: $30 repaid from Bob (cash)
Thing is, there's nothing to link those transactions together. If you look at these entries three years later, you'll probably be left scratching your head as to why Alice paid you back $30: there's no $30 transaction, so the $90 restaurant transaction won't jump out at you as the reason why Alice paid you back.
But with double-entry bookkeeping, you'd write that as follows:
Thursday Jan 1st: -$90 restaurant (credit card) +$30 my share of the restaurant bill (expenses) +$30 Alice's share of the restaurant bill (money owed to me) +$30 Bob's share of the restaurant bill (money owed to me)
Monday Jan 5th: -$30 Alice's share of the restaurant bill (money owed to me) +$30 cash received (cash)
Wednesday Jan 7th: -$30 Bob's share of the restaurant bill (money owed to me) +$30 cash received (cash)
It's not always obvious when you're new to double-entry accounting which entries should be positive or negative, but if you remember the "must add to zero" rule you'll be more likely to get it right. Money flowing into an account is positive, money flowing out of an account is negative. For credit cards, the money flows "out of" your credit card and into the restaurant's ownership, so the sign should be negative. When you pay the credit card bill later, the sign will be positive on the credit card account (and negative on your checking account, thus again adding to zero) because money is flowing out of your checking account and into your credit card account.
Now, look at that double-entry accounting. When you look at the Wednesday Jan 5th entry, and you see that Alice paid you back $30, you'll start searching for a $30 transaction earlier, and you'll pretty quickly find the January 1st and figure out that she owed you $30 because you had paid her share of the restaurant bill on the 1st. And even if the amounts don't line up (let's say she paid you $20 on Jan 5th and $10 on Jan 12th), there's still a "money Alice owes me" category which has a +$30 entry on the 1st, then -$20 on the 5th and -$10 on the 12th, all of which makes it pretty easy to figure out what Alice is paying you back for.
So by recording each entry in at least two places (it's not always exactly two places, e.g. the January 1st expense is recorded in four places total), you get more linkage between the items and it becomes a lot easier to see why the money was going out or coming in.
It wasn't wrong of course, there is so much history, ingenuity and the invention of double entry accounting, but I just couldn't get my brain to understand it.
The way the concepts settled in my head was: double entry accounting is just an excellent way of modelling a graph with nodes and edges. Accounts are nodes, transfers are edges. Every edge has a source and a destination.
For a paper ledger, each column is graph node, and each row is a graph edge.
That was enough for me to be able to learn the rest of the things I needed for interacting with the accounting world.
But I also realised that that description really only helps a very small part of the population. :D It makes things so much worse for most people.
"Hey could you help me understanding this accounting thing?"
"Sure, but first thing is, let's learn graph theory! You know who Dijkstra right?"
Whole buckets of nope.
But thats a digression from your actual question - whats the point?
Because it presents a rigid set of rules of recording transfers, everything has to have a from account and to account, every row adds up to zero.
Because of that, it makes it easy to spot any mistakes in data entry. If any of your rows dont add up to zero - then you've made a mistake.
However, if you have more than one account or debts, or budgets, then it becomes useful to track both sides of a transaction. If you track both sides of a transaction then you can easily answer questions like: 1. how much money do I have in my investment account? 2. how much debt do I have? 3. how much did I spend on recreational social activities?
You can track debts and investments separately, but then you are still making two entries just in two places.
I think many people have few enough debts and investment account that they track these separately, and the third question, budgeting, can be simplified if each vendor is only ever considered for a single budget, for example, all your flights are part of your vacation budget, and you don't care to break out a flight to a career related conference.
I think the main advantage is that you can granularly keep track of the movement of money, stocks, commodities, etc., and their conversions. As a day-to-day example, it gives you the ability to follow, for example, invoices received (Liabilities or Accounts Payable), transactions on a bank account (Assets), and what you are going to spend (or at some point, have spent) (Expenses).
This separation allows you to, for example, enter an invoice you've received on January 1 in Accounts Payable, with a corresponding value in Expenses. At this moment, nothing happened yet, it's simply an administrative transfer of some amount from an asset account to an expenses account (the sum of these transfers must be zero, so one amount is negative whereas the other amount is positive. See [0] for more details).
As a result, this gives you insight in what still needs to be paid. Once a transaction for that invoice enters your bank account on, for example, January 10, it gets "paid" to Accounts Payable, thus giving you a link between an invoice, its payment, and finally the amount spent. (This concept also works the other way around, see this sibling comment[1], where it's also extended into working with multiple accounts.)
[0] https://beancount.github.io/docs/the_double_entry_counting_m...
[1] https://news.ycombinator.com/item?id=46464893
The automatic import of expenses is so valuable for my family and keeping track of how much we've spent and how much we have left for the month.
We used the fixed-cost version for years beyond when it was officially supported, and it didn't have the automated import, and I don't think I could ever go back to a system that didn't. There were always a few days a month, at least, when I wasn't exactly sure where we were in our expenses.
The only tools that were able to provide that were GnuCash and PTAs like beancount.
My point is, there is a big segment of people who are not served by existing personal finance tools simply because they operate in more than 1 currency, or have a slightly more complicated setup than envelope budgeting.
I was travelling in the Nordics (they had 4 currencies back then, and they still do!) and wanted to have some precision what cash I exchanged with what rate...
But, you're right, I have no need for tracking stocks, as I only check in once a year or so, and I can't imagine YNAB would manage that well.
For anyone who wants to use this envelope method without paying for YNAB, I recommend checking out Buckets, which is another software that works similarly.
My only issue with Buckets is that the YNAB importer doesn't take into account that YNAB will take your overspending and take it from your next month's income. I have some bad habits that means I was really using YNAB as more of a financial tracker than an actually budget system. That's my own fault though. The envelope in question comes out to $-10k... That's all my own fault though. It just means I have to massage it into Bucket's system, or start a new budget.
It's made budgeting a tool to accomplish savings, wealth growth, and expense smoothing rather than simply a survival strategy. When you have to deliberately shift funds out of one category to cover another, you really consider the relative priorities.
With YNAB, it's been "hell yeah, I saved up for this and now I get to buy it."
Other wise all non envelope budget systems are horrible for me because I want the budget to be self adjusting so if I spend more on household items 1 month it needs to ensure I have less to spend over the next set of periods till I’ve gone back into positive . Rollover basically
How do you think it compares time-wise to using existing accounting software? Was the time investment worth it to get the control and visibility you now have?
Author here. I tried various consumer budgeting apps before I ended up building my own (and then going to Beancount). The main problem with every one of the apps I tried is that they don't handle investments well. 99% of my money is invested and having net worth figures which are wildly wrong because the app is only tracking bank accounts really annoyed me. That was the reason I built my own thing in the first place.
> Was the time investment worth it to get the control and visibility you now have?
Absolutely yes. I think it helps me really understand where my money is going, how I can make it work harder etc. Even though the RE part of FIRE doesn't appeal to me, the FI part does and knowing where I stand at all times has been very motivating.
I have question on a more personal front - please feel no obligation to reply.
What impact has having such clear visibility into your accounts had on your relationship with your wife? It feels like it would be a great catalyst for communication, trust and building things if shared finances was a key part of the relationship.
I think this part was the most inspirational - it takes a lot of courage to be that open about finances, even with partners, perhaps especially with partners.
> What impact has having such clear visibility into your accounts had on your relationship with your wife?
That's a great question. Thankfully when it comes to finances we are very aligned in our habits and goals. So we find it very natural to be open because we know that we're both going to be aligned.
Where we differ heavily though is how much we are willing to really getting onto the nitty gritty details. She really likes knowing how our money works but she also has no interest in spending so much time and effort on it.
But that works great because I love this stuff. So every month or so we have a "finances session" where I sit down with her, take her through the books and make sure we're both happy with everything.
Obviously this very much depends on the couple whether this works but it has for us so far!
Would you consider a follow up blog post about how you structure and approach your monthly finance sessions? I understand that it would be well outside of your topics of software engineering, performance and open-source, but I find that the human component of our industry is often missing. An insight into how someone has successfully navigated that would be a wonderful read.
Could you expand what were you looking for with respect to investments that was lacking?
I use GnuCash for many investment accounts (in multiple currencies) and haven't run into any limitation, it can show me the true net worth graph.
I'm sure GnuCash would also work just fine but ultimately it's also a full double entry system. I never tried it because I came across ledger/hledger/beancount first and, being command line tools, they appealed more to my sensibilities.
I ran a small business for a while, and I would draw a parallel to that. Once a family's finances hits the complexities of a small business, multiple assets, loans, cars, long term savings, investments, I'd say the granularity is worth it. I would certainly like to try it out.
I have to say seeing some macro-budget category summed on a year and seeing how much of my money they consume was quite useful just to recalibrate. It wasn't life changing but it triggered things like: am I really ok spending that much on restaurants?
So I decided to try this out with my bank who's export options are (one of the mentioned slightly silly multi-line format) XLSX or PDF only, and it appears they've done some "encryption" (really a simple substitution cipher and an embedded font with the characters jumbled up so it renders correctly) to the PDF to prevent this. All the marketing text and headers are in the pdftotext output fine but the actual data is all accented and non-printable characters (also if you copy/paste out).
The substitution cipher does seem stable across a few statements, but still seems like less work to work off the XLSX
For that type of "obfuscated" PDFs I've come across, it does well, it's just a lot slower to run than pdf2text.
What I'm seeing is that for example, POS is substituted to & !ë on every line in every file, etc. I can see by comparing to the rendered PDF for other common text (like my name, the local supermarket, etc) that those all seem to be 1:1 substitutions too.
Print the PDF to an image. Then use OCR. Then import the output from that instead.
Yes. The local banks here are pretty reliable for jumping on every dumb idea that anyone anywhere claims improves security.
I guess nowadays it's very cheap to run a headless browser, screenshot the output, and run it through OCR.. hah, to prevent that they'd have to design their webpage as 1 full screen Captcha..
As soon as we got real jobs with a real income, we didn't waste time with that. Our philosophy now is to just make sure that we spend well under our means and not track. We don't penny-pinch, but we still keep some of the grad school "do I really need this?" mentality.
Our normal spending is somewhere under 1/2 of our take-home (including mortgage), so we just don't worry about it and keep saving. It helps that we don't have fancy tastes. It's a nice stress free way of saving and we don't have to get neurotic about tracking every penny either.
It's a good point about the routine daily purchases, I never thought of that. But I live semi-rural so I'm not out every day wandering around the city and picking up a snack or anything like that. I imagine that could add up.
To the other point, a lot of people have a more or less daily Starbucks or other breakfast related habit.
I hate budgeting and still save around half my salary.
Though I do realize that this is a different game for some people, where some need it more than others.
Tracking expenses doesn't take more than 5-10 minutes per day, if you do it daily. With the correct workflow, it shouldn't take more than 30 minutes per month. There are even apps that would do that for you without any effort, though not so perfectly as fine tuned apps.
And now, the enlightenment part: how is expense tracking preventing you from making more money than visiting hecker news, reddit, social media, listening to the radio, watching TV, reading the news, or a million other things? Do you really spend all your waking hours earning more money so tracking expenses for a few minutes would make you make less?
Then you discover that you really do need to know how much you are spending on sandwiches.
Budgeting can make that manageable by significantly lowering your living standard but small expenses are rarely the root cause.
Adding all of it together is too much. So you set the thermostat lower by 3 degrees. Pack lunches two to three days a week and cut down the coffee a certain percentage etc.
Cutting any one thing out altogether will significantly reduce quality of life and won't get you there financially. Cutting back a bunch on each category will.
As I said, back of the envelope calculations will get you whatever outcome you desire. Real actual spending data will tell you the real story. There isn't a substitute.
350K in Missouri will give you a vastly different lifestyle than 350K in Denver.
If you have everything you want, no need to track!
Yes, I understand, I'm not stupid. I'm sure you can understand what's implied by my comment. I am saying all of that together is a ridiculous amount for a top 5% earner once summed.
We are not talking scrambling family of four here. At some earning level, difficulty paying the bill is nearly always structural.
It annoys people because it's easier to cut a cup of coffee than to admit you over mortgaged and the solution is obviously far less simple.
Paying too much for school? If cutting on those sandwiches means you can suddenly afford the school, would you choose to cut the school just because it's a clear, known large expense?
Earlier in my career I always wondered why people earning a lot more than me would not get lunch from outside or the cafeteria but would spend a lot of effort cooking and prepping the food for their work. Now I fully understand where they're coming from.
The little things do add up.
The point of my comment was that I too believed as you did. Always easy to believe things until you track your spending and see the actual numbers.
It's also how I know getting an 8 year old car without too many miles is the way to go.
I’d say that budgeting allows you to see how far off your ideal standard you are living. Spending too much on the kids school can be a deliberate choice or an afterthought from 4 years ago. Budgeting lets you see that and be deliberate about those choices.
Net worth is easy: assets - liabilities
You get the figures from your financial institutions and counting up your cash on hand.
The purpose of double-entry bookkeeping is to track the flow of money and to make sure nothing was missed.
But for net worth, you only need the end result, which you don't need any computation for.
For personal finance the problem is almost always very obvious ($3,000 on candles) and all the spreadsheets and budgets won’t change that.
- Values vs reality: A $3000 candle budget is fine, but if you're spending $10/work-day on candles it might be easier to see when that accumulates and you can compare it against your longer-term aspirational goals. This is especially true for less tangible expenses like subscriptions where it can be difficult to see "I'm spending $3000/year on candles I never burn" from ground level.
- Planning and decision-making: It's easier to make good life decisions (e.g. "should I take $job" or "can I buy $house") if you have an accurate accounting of your life expenses.
When we started using YNAB and entering our spending into it, it was like a hockey-stick diagram on our household net worth.
And this isn't even double-entry accounting (which I've adopted for my own personal spending). One thing I'll say is that the way we use YNAB seems different from most other people: we hand-enter every transaction, we don't import it afterwards from the bank. Then we reconcile what we thought we spent vs. what the bank says we spent.
In this way we have to be a bit more intentional about what we're spending money on since there's not some kind of big monthly exercise to make the numbers line up and then a "we'll try to be better next month". Instead it's more like an envelope system where we are tracking budget categories as the month goes by.
I didn't actually do this that much, I was much more interested in where my money was going over longer periods (say a year). It was nice enough, but I dropped it a few years ago when they had big price increase and became more expensive than it was worth to me.
For a long time, I didn't understand either because I thought everyone was like me always roughly aware of the balances of all their current accounts and with enough reserve that a moderate unplanned event is insignificant but that's not the case.
Some people have a terrible grasp of how much money they currently have. Some work on so tight a budget that even a small deviation triggers a lot of undesirable effets - banks are actually awful for that because they really milk their customers with resource issue.
That's why budgeting is so effective for some people. If your budget is killed by a few overdraft events, just avoiding that will give you a lot of breathing room.
My general rule is a simple system that works well enough is better than a complex, but precise system.
We build our budget with this slop in mind, so anything left over is bonus.
If you transfer 50k from one account to another and want to check your networth before the money comes back in, summing your balances won't help you.
I think this is besides the point though, I suspect OP wants to track networth over time.
I find value in tracking everything, tracking it by hand, and tracking it with precision (our household budget has 68 categories).
When I've tried easing up in the past (e.g., with Mint's lightweight approach) I was left with a budgetary black box where I felt like I never had enough information to make big purchasing decisions. I knew what I had in the bank account, but I didn't know if it was earmarked for anything, or whether the next surprise expense was going to wreck my plans. I felt afraid and paralyzed.
Earning more didn't make the problem go away. Like the financial equivalent of Parkinson's Law, more income just meant more spending. I couldn't out-earn unrestrained consumption. I had to monitor & manage it.
For peace of mind, I found YNAB's philosophy helpful: one-off expenses often repeat predictably on a long-enough time horizon, and can be amortized accordingly. If I itemize all predictable expenses and save a little each month, I know everything is taken care of, and what I really have left over. I never get blindsided because several big expenses hit at once.
I know not everyone has these problems. But I like to talk about my experiences because people don't all need the same things from their finances. It's okay and normal to want control and visibility.
Some are easy like the size of your bank balance. Others are much harder.
For example, one asset we have is our home and there are many websites out there that tell you how much it's worth but they each vary an awful lot and change dramatically - so much so sometimes that any savings you've made in the same period are eclipsed.
Similarly, the 401k I've been building up for years seems like a decent amount but trying to calculate what it's worth after taxes and therefore how much you'll have to spend each month seems unknowable.
I think the same is true of investment accounts. If we seeded one with $500 and it's now worth $250, it's easy to think your net worth has risen by $250 but it really hasn't when taxes, fees and who knows what else is taken into account.
I honestly completely ignore my purchased home value. It is not a regular asset because you have to make use of it, you can’t really liquidate it without a substantial change in your life (renting, marrying, going homeless, etc). If you trade it, you’d have to use that money to get some other housing. My strategy in my personal finances is to threat the house as if I’m renting. The money is gone from the balance, the equity isn’t tracked anywhere.
Anyone found a better way to keep on top of downloading statements?
I appreciate the level of detail in this post. I think there's often confusion about PTA tools because it can sound like the argument is plaintext == easy/simple.
The real takeaway is "if you're going to go through all of the trouble of managing your economy, you may as well make sure you control your data and own your system."
[1]: https://news.ycombinator.com/item?id=46463644
This was the cheapest and easiest way to account for stuff for me