Reconciliation, opening balances and closing the year
General educational material, not professional advice. See Not professional advice.
Reconciling bank and credit card accounts
Reconciliation is checking that your books agree with an outside record, usually a bank or card statement. If the statement says the account held $4,210.55 on March 31 and your books say something else, one of you is missing a transaction, has one twice, or has an amount wrong. The mistake is usually in your books, not the bank’s.
Reconcile every account that has a statement: bank, credit card, loan, brokerage. Most people reconcile monthly, because one month is quick to check and a year of unreconciled entries is not.
The steps:
- Take the statement’s ending balance and date.
- Compare each statement line with your entries for that account and period.
- Add what’s missing, remove duplicates, fix wrong amounts and dates.
- Confirm your balance on the statement date equals the statement’s.
- Record that you did it, so you never re-check the same period.
Balance assertions (recording a reconciled balance in hledger)
hledger records step 5 as a balance assertion. An = after a posting amount states what the account’s balance must be after that posting. If it isn’t, hledger reports an error and won’t load the journal until you fix it.
2026-03-01 Opening balance
assets:bank:checking $4,000.00
equity:opening balances
2026-03-14 Client payment
assets:bank:checking $1,500.00
revenue:consulting
2026-03-28 Software subscription
expenses:software $129.45
assets:bank:checking
2026-03-31 Monthly fee
expenses:bank fees $10.00
assets:bank:checking $-10.00 = $5,360.55
The last line says “after this fee, checking holds $5,360.55, as on the March statement”. Any later edit that changes March’s checking total breaks the assertion, so hledger flags any change to a month you have reconciled.
In Ledgeline, running balances show each assertion as passing or failing next to the balance, and narrow to the gap jumps to the date range where a failing assertion went wrong.
Cleared and pending status
hledger also lets you mark each transaction’s status: * for cleared (it appears on the statement) and ! for pending (you’ve entered it but the bank hasn’t processed it yet, such as an uncashed check). Many people mark entries cleared as they tick them off a statement.
2026-03-28 * Software subscription
expenses:software $129.45
assets:bank:checking
2026-03-30 ! Check 1007 to landlord
expenses:rent $1,200.00
assets:bank:checking
hledger balance -C assets:bank:checking then shows the cleared balance, which should equal the statement. The Journal tab lets you click a row’s status badge, or press s, to cycle it. Reviewing transactions is a separate pass for categorizing imported entries.
Opening balances (starting your books mid-stream)
Few people start their books on the day they open their first bank account. You start on some date with accounts that already hold money and debts already owed. An opening balances transaction sets each account’s starting balance, with the difference going to equity.
2026-01-01 Opening balances
assets:bank:checking $5,240.00
assets:bank:savings $12,000.00
liabilities:credit card $-830.00
liabilities:car loan $-9,400.00
equity:opening balances
The equity line comes out at $-7,010, which is your net worth on that date, equal to what you own minus what you owe. Take the figures from statements dated just before your start date. For an investment account, enter the holdings with their cost (see Investments).
Ledgeline’s New ledger wizard and bank sync can write opening balances for you.
Year-end close (closing the books)
At the end of a business’s financial year, accountants close the books. They finish the adjusting entries, reconcile everything, produce the year’s statements, and then reset the income statement so the new year starts from zero. The year’s profit or loss moves into equity as retained earnings.
The reset is optional in hledger. Reports take a date range, so a 2027 income statement already ignores 2026 without any closing entry. People close for other reasons:
- Their accountant or tax return expects retained earnings as a figure in the books.
- They start a new journal file each year and need the balances carried over.
- They want a clear marker that the year is final.
Retained earnings (where profit goes at year end)
Retained earnings are the profits a business has kept rather than paid out to its owners, added up over its whole life. Each year’s net income (revenue minus expenses) is added to it, and owner draws or dividends come out of it.
Ledgeline’s balance sheet shows a computed retained earnings line even if you never close the year. It is all revenue minus all expenses up to the report date. That keeps assets equal to liabilities plus equity.
Closing the year with hledger close –retain
hledger close --retain prints a transaction that moves every revenue and expense balance into equity:retained earnings (or an account you name with --close-acct). Give it the day after the year ends, and it dates the transaction on the last day of the year. Check the output, then add it to your journal.
hledger close --retain -e 2027-01-01
Here is a small business’s year, followed by the transaction the command printed for it:
2026-01-01 Opening balances
assets:bank:checking $10,000.00
equity:opening balances
2026-03-01 Consulting income
assets:bank:checking $62,000.00
revenue:consulting
2026-04-01 Rent for the year
expenses:rent $14,400.00
assets:bank:checking
2026-05-01 Software for the year
expenses:software $1,548.00
assets:bank:checking
2026-12-31 retain earnings ; retain:
expenses:rent $-14,400.00 = $0.00
expenses:software $-1,548.00 = $0.00
revenue:consulting $62,000.00 = $0.00
equity:retained earnings
The = $0.00 assertions confirm each account is empty afterwards, and the blank amount works out to $-46,052.00, the year’s profit. From then on the year’s revenue and expenses read zero as of year end, and the profit is in equity.
Because the closing entry falls inside the year, it cancels the year’s figures in any 2026 report. Leave it out with the retain: tag hledger puts on it, as in hledger incomestatement -p 2026 not:tag:retain.
Carrying balances to a new file with hledger close –clopen
If you keep one journal file per year, hledger close --clopen prints two transactions, one closing the asset and liability balances at the end of the old year, and one reopening them on the first day of the new year. Put the closing transaction at the end of the old file and the opening one at the start of the new file. hledger 1.52 also accepts --migrate for this.
Ledgeline handles multi-year books either way. It follows include directives, so one main file that includes each year’s file is a common setup.