Understanding the Double-Entry Principle
An engineer's guide to the Double Entry principle with LedgerForge.
If you've read any part of the LedgerForge documentation, you must have heard about the Double Entry Accounting principle.
It is a big deal in the financial world. Every business, small, medium, or large, relies on this simple principle to do accurate bookkeeping and reconciliation of their books.
The Double Entry Accounting principle
The Double Entry Accounting principle states that for every entry into an account, there needs to be a corresponding and opposite entry into a different account.
Only two types of entries can happen in an account — a credit and a debit. When an account is credited, money is added to the account, and when it is debited, money is removed from the account. So if there's a credit entry in one account, there must be an equal debit entry in another account.
Part 1: The Basics
There are two rules to the double-entry principle:
- Every financial category in your organization is represented by an account (balance).
- Every financial transaction is modeled as a "transfer" between those accounts.
For example, let's say User A has $5,000 in their account and they pay the company $3,000. If we tracked only the company's accounts, we see only a $3,000 credit with no information on where it came from — which isn't correct.
| Step | User A Balance | Company Balance |
|---|---|---|
| Starting balance | $5,000 | $0 |
| Invoice paid | -$3,000 | +$3,000 |
| Ending balance | $2,000 | $3,000 |