Hacker News new | ask | show | jobs
by potamic 1406 days ago
Any time the idea of double entry bookkeeping comes up there is nothing but unanimous advocacy for it. This thread echoes the same sentiment where there's several comments about the importance of double entry. And yet like all previous endorsements I've heard, I've not been able to take away why it is so important. The reasons are always around error tracking, tracing source of funds, standing the test of time etc. and yet in my head I'm not able to envision the specific problem double entry can solve that single entry cannot.

Somewhere in my head I feel a double entry system makes sense if you have two different parties making respective entry. But if it's all with a single party, single entry system should be equivalent to a double entry system. My accounting concepts are weak so I'm unable to justify. Hoping someone with more expertise can shed some light here.

19 comments

The name "double-entry bookkeeping" may be misleading: what matters is not how many times / in how many places you do entry, but whether you're tracking both (or all) sides of a transaction. (With a computer you only need to enter the transaction once, as long as you track the "from"/"to".)

A couple of examples from personal money-tracking:

• say you have a bank account, and you track when the bank balance increases / decreases. That's single-entry. When you withdraw cash from your account at an ATM, your bank balance decreases, and when you buy something with cash your balance doesn't change — this is probably not what you want. With double-entry bookkeeping, you track separate "accounts" for (say) "bank account", "cash" and "outside world", and every transaction is an edge in this graph (or in general, hyperedge in hypergraph). (E.g. withdrawing $100 cash means a transaction that is -$100 on "bank account", and +$100 on your "cash" account, which add up to 0.)

• Similarly, with your bank account and credit-card account, when you pay your credit-card bill it's a transaction between your bank account and credit-card account, and when you buy something with your credit card it's a transaction between your credit-card account and the "outside world" account (which you can break down more granularly if you want to track your expenses).

Summary: double-entry bookkeeping means that instead of entering "this balance decreased" or "this balance increased" (without a direct way of linking where the money came from or went), you enter transactions that track all the changes as one unit, and in each transaction the sum of the "postings" is 0.

Or just read this by Martin Blais, it's still the best: https://beancount.github.io/docs/the_double_entry_counting_m...

That manual skips over the reasoning too:

> This is called the single-entry method of accounting. But we’re not going to do it this way;

Why? So you have a graph now, what does that allow you to solve? What issues will you hit with single-entry (maybe with tags)?

I _think_ the simple answer is that if you have multiple accounts, any transaction moving money between them needs to decrease one if you increase another or else you'll magically gain/lose money in your records. Then if you use it to answer something like "do I have enough money to buy X" you'll get an incorrect answer. It doesn't seem to be a suggestion/improvement/technique and more of a mathematical reality for this model.

The double entry requirement for money entering/exiting the system (salary, sales, payments) doesn't seem to matter for that though.

This is such a clear explanation of double entry accounting, thanks for this.
Thanks for the examples!
Double-entry is kind of a bad name, but the concept is sound.

I like think of each entry as the complete journal entry - a set of debits (abbreviated DR) and credits (abbreviated CR) that describe an event. Debits and credits are, as many accounting instructors have taught many students, names that effectively mean "Left Side" and "Right Side". Some accounting systems represent debits as positive numbers and credits as negative numbers - this is perfectly valid too.

Say somebody purchases a product for $60 and a service for $40 from me. The product that I sold cost me $40 to purchase, and both the product and service have a 5% sales tax applied. This is a very common transaction - car repairs, for example, are usually a combination of products (e.g., oil, oil filter) and services (e.g., oil change and inspection).

    Account               DR      CR
    Cash in bank         105
    Tax Payable                    5
    Sales Revenue                 60
    Services Revenue              40
    Cost of Goods Sold    40
    Inventory                     40
In this example, I collected $105 in cash from my customer which will go into my bank account. Because of this sale, I now owe the relevant tax agency $5 because I collected sales tax on their behalf. I recognized sales revenue of $60 and services revenue of $40. Since I sold some physical goods that I had in inventory, I also reduced the value of my inventory by the cost of what I sold.

This is, in my mind, one "entry" which has six detail lines to recognize all of the different things that need to be recorded for this event. The important point is that everything balances, credits always equal debits.

Some businesses might not do the Cost of Goods Sold / Inventory entries with each transaction, instead they might count their inventory once a month and calculate out how much they sold (inventory at start + inventory purchased - inventory at end = cost of goods sold) and just do one entry a month to get the books in sync with reality.

Think of each transaction as a movement: it has a source and a destination. Therefore, you need to account for it in two places: where it came from, and where it went.

Does that make more sense?

I think you can expand this explanation with database terminology.

In modern RDBMS, you could have naive implementation with two account's balance, and increment one decrement the other. But without transactions it just isn't safe, its better to have one row in a table with a debit and credit.

Now if you're doing accounts by hand you really need that single line transaction record.

> its better to have one row in a table with a debit and credit.

No. Some transactions have 3 lines, eg: two debits and one credit. Some examples: - Split payment at a shop, $100 item bought with $70 cheque and $30 cash would be credit sales $100 debit cash $30 debit bank $70

Now if you introduce sales tax or VAT/GST, its more complicated. Say the $100 item is actually $90 + $10 VAT, then entries goes: credit sales $90 credit vat-payable $10 debit cash $30 debit bank $70

I saw some systems that used single line, even in these cases. It had an ephemeral/transitory account to help on this. And to map it together, all these entries would be related to a single transaction. It seemed a nice solution for me.
Quite simply each entry contains both the "to" and "from" for the transaction. It's a construct to guarantee atomicity. The two "sides" of the transaction can never be out of balance with each other. If you lose an entire entry the system remains in balance-- you've lost a transaction but you're not in a situation wondering "where the money went" because nothing moves without both sides of the transaction.
"Single-entry accounting" usually means that you have one account that is the source of truth for the whole operation. For example, you use the checking account balance. When you take in sales, you put it in the sales column and increase the balance. When you pay the electric bill you put it in the electric column and decrease the balance. You have a couple issues:

1. How do you keep track of unpaid invoices and bills?

2. How do you account for things like asset values, depreciation, etc.?

3. If you have income or expenses that register multiple accounts, you have to sum the right columns.

4. If you missed a leg of a complicated transaction (recording the income and sales tax liability for the day across multiple payment forms, for example), you might never know it, e.g., you might accidentally record the sales tax payable as income.

Using the accrual accounting method (as opposed to the cash method), where you book sales at the time they occur, is next to impossible with single-entry accounting. If you have a mostly inventory-based business, you have to use the accrual method in the US. Most businesses that must make financial statements available to investors will use the accrual method.

This article [1] "Accounting for Computer Scientists" may help. Visualize money movement between Accounts / Nodes triggered by Transactions / Edges.

This model is used to construct a "Fund flow" representation of how money should be moved. One of the essential concepts we use to verify that money is moving through the system is "Clearing", where we add up all of the edges and the balance should equal 0 - that is money reached its intended destination.

[1] https://martin.kleppmann.com/2011/03/07/accounting-for-compu...

Easy: double entry is append only database (immutable data). To compute account value you sum() over all transactions. Each transaction is required to sum to zero (credits=debits), so the sum over all transactions is also zero (balanced). You store the history of transactions.

If you instead update account values in place (stored as sums) then you can't check your accounts are balanced (missing money bad)

Single entry bookkeeping is essentially a list of your income/expenses. A list of this nature means you can't be certain you got everything, if an item is missing or has been double counted it wont be obvious at first glance that it is wrong.

Double Entry bookkeeping adds a layer to your lists to ensure that everything has been accounted for, you are creating the same list but also tracking the opposite side which is what it affected.

The most simple case here is that the income/expense also affects your bank account. By tracking the bank account you now can check that your "Predicted" bank balance according to your list is actually what is in the bank account. If they don't match then you know for certain something got missed.

It doesn't solve all the errors that can possibly occur, but it makes sure that the basics are at least covered.

How does it make sure something hasn't been double counted? I assume you mean this situation:

1. Debit for X added 2. Credit for X added 3. Debit for X added again

Then you'll get a discrepancy when you sum them.

In a computerized system though you wouldn't make that mistake though, or else you could make it with double entry accounting too (just, you'll have double credit entries as well).

The only way to prevent duplicates is to associate upstream payment/transaction ids with records and make sure every entry is unique (which can be done for single entry accounting too).

Let’s take a simple example I buy a plane ticket on January 1st with my credit card for $100 for a flight on March 15th. I paid my credit card bill on February 15th.

I simplistic view would be I spent $100 on January 1st.

Using double entry accounting I can track what is actually happening in that transaction,

1. I buy the ticket w/credit card (CC lent me $100 for an asset (plane ticket) = (cash +100, liabilities +100, assets +100, cash -100) 2. I pay my credit card bill (cash -100, liabilities -100) 3. I take my flight (+100 expense, -100 net worth)

Steps one and two I have yet to incur an expense, cash is changing hands and the composition of my balance sheet is changing, step three I actually incur an expense. That’s the beauty.

Double entry bookkeeping simply represents flows of money as a directed graph, and that turns out to be a very useful thing.
> And yet like all previous endorsements I've heard, I've not been able to take away why it is so important.

Double entry accounting is basically a shorthand for the Fundamental Equation of Accounting:

Income - Expenses = (Assets - Liabilities) + Equity.

We call it "double entry" accounting because within the constraints of that equation you cannot adjust one account without also adjusting at least one other account. It applies equally to the books as a whole as it does to the individual transactions, so you can validate one by validating the other. So at data entry time, you can be relatively sure that you did the right thing because the transactions balance. And later, when your bank statements come in, you can easily reconcile because you have them broken out by account already -- and given the double entry system was already in balance, we know that any mistake you detect at this stage likely means a mistake in another account!

It also serves to disambiguate certain transactions. One example would be a cash advance from a credit card. In a single entry system, I don't have sufficient metadata to determine whether that is income, or a liability that needs to be repaid. In a double entry accounting system, I can simply check the source of that credit and see "ah, this came from a liability account".

If it helps, you can think of it as a complicated form of transaction tagging, with some mathematical constraints on the sum of tags in any transaction.

It's usually expressed as

Assets + Expense = Liabilities + Equity + Income

The two accounts on the left normally carry a debit balance, and three on the right normally carry a credit balance.

At the end of the accounting period, subtract the Expense balance from both sides of the equation, and close out (Income - Expense) into Equity, i.e. if that was positive, Equity increases.

Or, in a computerized system,

Assets + Expense - Liabilities - Equity - Income = 0

> But if it's all with a single party

If you dig in deeper you’ll see that there’s never a single party. Money always moves from someone to someone else. So even if it’s a single party the money is moving from marketing department to customer acquisition. Let’s say you are giving customer 10$ signup bonus. That money has to come from somewhere and has to be accounted for.

One just can’t create or destroy money. And the best way to ensure that is double entry accounts.

If you are interested in error-preventing and tamper-proof fund tracking systems, have a look at the UTXO model. Bitcoin and many cryptocurrencies use it, but the actual model predates Bitcoin.

https://en.wikipedia.org/wiki/Unspent_transaction_output

For those who use single-entry systems, if you've ever had to "split" a transaction into multiple categories, you're halfway to understanding double-entry. Especially if your "split" has both income and expense categories. For instance, if you want to accurate categorize your paycheck, some of the categories will be income like "gross salary", and some will be expense like FICA and tax. The trick is that all those amounts, positive and negative, need to add up to the net deposit that hit your bank account. Whereas in double-entry accounting, the combined debits and credits need to add up to zero.
People are making this too complicated.

I transfer money from savings to checking. That is a double entry. Money comes out of savings and goes into checking. Savings->Checking

I need to use the food money envelope to buy clothing. Double entry is just keeping track of what I did. Food Envelope->Clothing. Then 6 months later I can see where my money actually went, and how much I spent on food, and clothing, separate from how much I put in the food money envelope.

You may not need double entry if you’re just tracking your personal checking account to see if you can pay your bill… but it still may help.

You answered your own questions though. It’s useful for error tracking and consistency. As a simple example to explain how it can help from a consistency perspective - think about a tool like Mint or Personal Capital or Nerd Wallet. They let you sign into your bank account and use a GUI to track all of your transactions. Ignore any privacy concerns. If you have 5 credit cards (because points), 2 checking accounts (you+spouse), a savings account, brokerage, mortgage, etc - there’s a lot of room for money to jump between accounts. Now imagine that you don’t include your mortgage account in the app. Whenever you pay money… it looks like your net worth is decreasing. In these apps, it might show up as a “purchase”. But you’re actually getting richer (by paying off debt and gaining house equity). If you include the mortgage account, you get to bring “the other side” into scope - boom - you now have an accurate view of the world when you didn’t before. That’s kinda sorta ish comparable the value of double entry. One side doesn’t tell the whole story, but always tracking both sides does.

Of course, the error-correcting part comes when there was a mistake or a correction that needs to be added. (Mortgage lended says balance is wrong?Here’s the sum of all transaction from checking acct to mortgage!). If double entry, both sides of a single tx have to match, and you don’t track the balance, you derive the balance from the sum of all transactions. So you theoretically can’t get a case where one ledger (eg mortgage) doesn’t match the other (eg checking). Helps a lot more when you’re a multinational bank with $1T and 50 million customer accounts.

Another example is a cash registers in stores. There’s a much higher chance the balance of cash is wrong (more room for human error). Being able to compute the balance over time based on the transaction history is useful for determining register 5 keeps losing money. Every change in cash balance should match another transaction so the total value of business’s money doesn’t change. Or just confirming that once you bring the cash to the bank there will be enough balance to pay a loan.

Does this directly impact you on a day to day basis? Maybe no. But I hope that’s a super simple illustration of why it’s conceptually useful and what “error tracking and consistency” means.

To be a little pedantic, the beauty of double entry is that you can actually see that you DON’T get richer by paying down your mortgage (or poorer - also excluding the effect of lowered future interest payments), you’re just shrinking your balance sheet (by reducing an asset (cash) and a liability (loan) by the same amount)
It is essentially a checksum for transactions. You record where money came from and where it went to. All those entries should balance out to zero if you have recorded them correctly. If you haven't, you can detect an error because you'll have more money going in than going out or vice versa.
Here's a free university textbook on Accounting if you'd like to dabble a bit :)

https://principlesofaccounting.com/

I'm going to chime in on this. Note, however, I'm not an accountant/CPA/etc. and in that sense my take is my own; I have spent the majority of my career working with accountants implementing accounting systems so have some practical experience with the subject.

As others have mentioned a basic double-entry accounting transaction includes two pieces of information: "where did the value come from" and "where did it go". This aspect of double entry book keeping I think is the less interesting one and you'd be right in not seeing any big deal as compared to single entry accounting... a check register style accounting with categories fits that definition pretty well. The debit/credit recording of double entry book keeping is really about the next point. Note that I used the word "value" because that value isn't necessarily cash, though value is always expressed in money terms.

The next aspect, and the important aspect, is not the transaction but the accounting equation: Assets = Shareholder's Equity + Liabilities. This is where the formalisms of double entry accounting start to differentiate itself from single entry accounting. This equation expresses what it is we ("the company") own (assets) and who has a claim on it (shareholders and others we owe such as lenders). All of our accounts are assigned into one of these three categories and whether we debit or credit an account depends on this categorization relative to the accounting equation. So if I buy a hot dog for lunch with my bank card I'll credit my bank account (an asset account) which reduces it's value and debit an expense account which is a special kind of shareholder's equity account. Shareholder's equity = retained earnings from prior years + (current revenue - current expenses). When I book the expense debit the result is that shareholder's equity decreases. On the other hand if I use the same bank account to buy a house... I still credit the bank account (an asset account) but now I debit a real estate account (a different asset account) which reflects that I changed the form of the property I had (cash to real estate), but I didn't change the shareholder's equity position or the liability position (yes, there are fees and most people buy houses with borrowed money... but ignore that for this discussion).

In the single entry world everything aside from the transaction itself is simply left to you to figure out. There really aren't additional formalities which guide you in getting a deeper understanding of the accounting data you generate. You could emulate this stuff, but typically something like Quicken isn't going to help you be sure your following these formalities. For many interested in personal accounting, not having these formalities is fine. But in business, the accounting equation and the many expansions of that equation tell you about the business is a way that is (should be) reasonably consistent from business to business. It's more than: "do I have enough in the bank for the next transaction", it's really about a clear statement of health and direction derived from the transactions.