Skip to content
Operations

Double-Entry Bookkeeping Online: Journal Entry Examples and the Trial Balance

Double-entry bookkeeping records every transaction in at least two accounts, with total debits equal to total credits, so the books always balance. Online, you enter each transaction as a journal entry (voucher), post it when it is reviewed, and the trial balance proves the ledger still balances.

By the Ledgeriano editorial team11 min readUpdated:
Double-entry bookkeeping online: a balanced journal entry with debit and credit lines next to a trial balance

Double-entry bookkeeping records every transaction in at least two accounts so that total debits always equal total credits. When a company buys 20,000 USD of stock on credit, inventory goes up by 20,000 (a debit) and the amount owed to the supplier goes up by 20,000 (a credit). Online bookkeeping software does the arithmetic and the checks, but you still need to know which side each account goes on.

This guide explains the debit and credit rules, the parts of a journal entry, six worked journal entry examples, the difference between draft and posted entries, reversals, and how to read a 2, 4 or 6 column trial balance. Examples use the IFRS chart of accounts template in Ledgeriano, with amounts in USD.

What is double-entry bookkeeping?

Double-entry bookkeeping is the method of recording each transaction as equal debits and credits in two or more accounts, based on the accounting equation: Assets = Liabilities + Equity. Every entry keeps that equation in balance. Income and expenses are temporary equity accounts: revenue increases equity, expenses reduce it, and at year end both are closed into retained earnings.

Why it matters in practice:

  • Errors show up. An entry where debits do not equal credits cannot be posted.
  • Every balance has a source. Any figure in the balance sheet can be traced to the entries behind it.
  • Statements come out of the ledger directly. The balance sheet, income statement and cash flow statement are built from the same postings.

Debit and credit rules for each account type

Debits are the left side of an entry and credits are the right side; whether a debit increases or decreases an account depends on its type. This is the table to keep next to your keyboard:

Account typeExamples (IFRS template)IncreaseDecreaseNormal balance
Asset1103 bank, 1111 trade receivables, 1124 inventoryDebitCreditDebit
Expense5101 cost of goods sold, 6201 salaries, 6205 rentDebitCreditDebit
Liability2111 trade payables, 2131 VAT payableCreditDebitCredit
Equity3111 share capital, 3201 retained earningsCreditDebitCredit
Revenue4101 sales of goods, 4102 servicesCreditDebitCredit
Contra accounts1113 allowance for doubtful debts, 4201 sales returnsOpposite of the parent typeOpposite

A quick memory aid: DEA / LER. Dividends (drawings), Expenses and Assets live on the debit side; Liabilities, Equity and Revenue live on the credit side.

Anatomy of a journal entry (voucher)

A journal entry, often called a voucher, has a header that describes the transaction and lines that record the amounts. Here is what each part does in an online system like Ledgeriano:

The header

  • Number: assigned automatically and in sequence within each fiscal year.
  • Date: decides the fiscal year and period. A date in a closed year or before the lock date is rejected.
  • Voucher type: GEN (general), SAL (sales), PUR (purchases), RCT (cash receipt), PAY (cash payment), PRL (payroll), ADJ (adjustment), plus opening and closing types used by the system. You can add your own.
  • Reference: the invoice, order or bank reference, such as INV-1001.
  • Description: what happened, in words someone can understand in two years.
  • Currency and exchange rate: for foreign currency entries; reports convert to the base currency.
  • Tags: free labels for filtering, like "shop" or "intercompany".

The lines

Each line has an account, either a debit or a credit (never both), and optional details: a line description, a party (customer or supplier), a cost center and a project. Accounts such as trade receivables and trade payables require a party, so balances per customer and supplier are always available.

Attachments

You can attach the source document to the entry: a PDF invoice, a photo of a receipt, a spreadsheet or a contract (up to 10 MB per file). Auditors ask for these first, and having them on the entry saves the hunt through email.

Six journal entry examples with debits and credits

These six entries follow a new trading company, Northwind Trading, through its first month. VAT is 5% in this example. Each table is one voucher.

1. Capital contribution

The owners pay 50,000 USD into the company's bank account for shares.

AccountDebitCredit
1103 Bank, main operating account50,000
3111 Ordinary share capital50,000

The bank (an asset) increases with a debit; share capital (equity) increases with a credit.

2. Inventory purchase on credit with VAT

The company buys goods for 20,000 USD plus 1,000 VAT from supplier S001, payable in 30 days.

AccountPartyDebitCredit
1124 Merchandise inventory20,000
1134 VAT receivable (input VAT)1,000
2111 Trade payablesS00121,000

Input VAT is an asset because it will be deducted from the VAT the company collects.

3. Rent paid from the bank

Office rent for the month, 3,000 USD, is paid by bank transfer.

AccountDebitCredit
6205 Rent expense3,000
1103 Bank, main operating account3,000

4. Monthly payroll

Gross salaries are 12,000. Employees' social security (7%, 840) and payroll tax (900) are withheld, and the employer adds its own contribution of 1,500. Net pay of 10,260 is transferred.

AccountDebitCredit
6201 Salaries and wages12,000
6203 Employer social security contributions1,500
2123 Social security contributions payable2,340
2134 Payroll tax payable900
1103 Bank, main operating account10,260
Total13,50013,500

The 2,340 payable is the employee share (840) plus the employer share (1,500). Both liabilities are cleared when the company pays the authorities.

5. Sale on credit with cost of goods sold

The company sells goods for 30,000 plus 1,500 VAT to customer C001. The goods cost 18,000. One SAL voucher records both the sale and the cost:

AccountPartyDebitCredit
1111 Trade receivablesC00131,500
4101 Sales of goods30,000
2131 VAT payable (output VAT)1,500
5101 Cost of goods sold18,000
1124 Merchandise inventory18,000
Total49,50049,500

Recording COGS at the time of sale is the perpetual inventory method. With a periodic method, you would record purchases during the month and adjust inventory at the end.

6. VAT settlement

At the end of the VAT period, output VAT (1,500) exceeds input VAT (1,000), so the company pays the 500 difference.

AccountDebitCredit
2131 VAT payable (output VAT)1,500
1134 VAT receivable (input VAT)1,000
1103 Bank, main operating account500

If input VAT were larger, the balance would stay in 1134 as a refund due. Rates and rules depend on your country; the standards page lists templates that include VAT accounts (for example the GCC and Iranian charts).

How to record a journal entry, step by step

Recording a journal entry takes five steps, in this order:

  1. Identify the source document: invoice, bank statement line, payroll sheet or contract.
  2. Decide which accounts change and whether each increases or decreases.
  3. Apply the debit and credit rules from the table above.
  4. Check the totals: debits must equal credits to the cent.
  5. Save as draft, attach the document, review, then post.

In Ledgeriano the entry form shows the running difference between debits and credits and will not post an unbalanced voucher. Validation also catches inactive accounts, parent (non-postable) accounts, missing parties and dates in closed periods. If you post entries from another system, the accounting API guide shows the same rules applied over HTTPS.

Draft vs posted entries

A draft entry is a work in progress that can be edited or deleted and does not appear in reports by default; a posted entry is final, counts in every report and cannot be changed. The split creates a natural review step.

DraftPosted
Can be editedYesNo
Can be deletedYesNo
Included in reportsOnly if you choose to include draftsAlways
Who can create itBookkeeper and aboveAccountant and above (permission to post)
How to correct itEdit itReverse it and record a new entry

A common team setup: a bookkeeper records drafts during the day, and an accountant reviews and posts them, one by one or in bulk (up to 200 at a time). See roles and permissions for the full list.

Tip: Post in small batches, daily or weekly. A backlog of 600 drafts at month end means nobody really reviews them.

Why posted entries are reversed, not edited

Posted entries are immutable so that the ledger keeps a complete history: once a figure has been reported, the correction must be visible too. To fix a posted entry you reverse it, which creates a new entry with the same lines and the debits and credits swapped, marks the original as reversed, and links the two. Then you record the correct entry.

Example: the rent in entry 3 was posted as 3,300 instead of 3,000.

  1. Reverse the entry. The reversal debits 1103 for 3,300 and credits 6205 for 3,300.
  2. Record a new entry: debit 6205 for 3,000, credit 1103 for 3,000.
  3. The net effect is rent of 3,000, and the audit trail shows exactly what happened.

You can choose the date of the reversal, which matters if the original period is already locked. Businesses that prefer it can allow unposting in their settings (it is off by default), but reversal is the method auditors expect.

The trial balance: 2, 4 and 6 columns

A trial balance is a list of every account with its debit or credit balance at a date; if total debits equal total credits, the ledger is arithmetically in balance. Here is Northwind's trial balance after the six entries above, in the 4 column format (period movements plus closing balances):

AccountPeriod debitPeriod creditBalance debitBalance credit
1103 Bank50,00013,76036,240
1111 Trade receivables31,50031,500
1124 Merchandise inventory20,00018,0002,000
1134 VAT receivable1,0001,000
2111 Trade payables21,00021,000
2123 Social security payable2,3402,340
2131 VAT payable1,5001,500
2134 Payroll tax payable900900
3111 Share capital50,00050,000
4101 Sales of goods30,00030,000
5101 Cost of goods sold18,00018,000
6201 Salaries and wages12,00012,000
6203 Employer social security1,5001,500
6205 Rent expense3,0003,000
Total138,500138,500104,240104,240

Which format should you use?

  • 2 columns: only the closing debit and credit balance. Good for a quick check and for preparing statements.
  • 4 columns: period movements plus closing balance, as above. Good for monthly reviews.
  • 6 columns: opening balance, period movements and closing balance. Best for a period inside the year, because you see where each account started.

Ledgeriano produces all three from the same data, at any level of the account tree, with CSV export. Totals are taken from one level only, so parent accounts are not double counted.

What "balanced" does and does not prove

A balanced trial balance proves that debits equal credits. It does not prove that the right accounts were used. These errors still balance:

  • Posting rent to 6201 salaries instead of 6205 rent (error of commission).
  • Forgetting an invoice entirely (error of omission).
  • Swapping debit and credit on both lines of an entry (reversal error).
  • Entering 3,300 instead of 3,000 on both sides (error of original entry).

That is why you review account balances, reconcile the bank and check party balances, not just the totals. The financial statements guide shows how the trial balance becomes the balance sheet and income statement.

Common journal entry mistakes and how to avoid them

  1. Posting to a parent account. Use postable accounts like 6205, not the group 62. The software rejects parent accounts.
  2. Receivables without a customer. Always add the party; otherwise the customer statement is wrong.
  3. Gross vs net VAT. Revenue is the net amount; the VAT goes to 2131.
  4. Editing history. Reverse posted entries instead of deleting and re-entering them.
  5. Wrong date. An invoice dated 31 March belongs in March even if you enter it on 3 April.
  6. Vague descriptions. "Payment" tells nobody anything; "Rent for March, office 4B, transfer ref 88213" does.
  7. Skipping the attachment. No document, no evidence.

At year end, revenue and expense accounts are closed into retained earnings (3201) through the income summary; the year-end closing guide covers that last entry of the year. For definitions of the terms used here, see the accounting glossary, and for credit costs of recording and posting entries, see pricing.

Frequently asked questions

What is a journal entry in accounting?

+

A journal entry is the record of one transaction in the books, with a date, a description and at least two lines whose debits equal the credits. In many systems it is also called a voucher.

How do you know whether to debit or credit an account?

+

Look at the account type. Assets and expenses increase with a debit, while liabilities, equity and revenue increase with a credit. Decreases go on the opposite side.

What is the difference between a draft and a posted journal entry?

+

A draft can still be edited or deleted and is excluded from reports by default. A posted entry is final, appears in every report and can only be corrected with a reversal.

What is a trial balance and why must it balance?

+

A trial balance lists every account's debit or credit balance at a date. Because every entry has equal debits and credits, the totals must be equal; a difference means a recording error, although a balanced trial balance can still hide errors like using the wrong account.

What is the difference between a 2, 4 and 6 column trial balance?

+

A 2 column trial balance shows only closing balances. A 4 column version adds the period's debit and credit movements, and a 6 column version also shows opening balances, which is useful for a period in the middle of the year.

How do you correct a posted journal entry?

+

Reverse it and record the correct entry. The reversal swaps the debits and credits of the original, so the net effect is zero, and both entries stay in the audit trail.

Can I do double-entry bookkeeping online for free?

+

Ledgeriano gives new accounts free credits, which is enough to set up a business and record your first entries. After that you pay per action with credits, as listed on the pricing page.

Reviewed by our accounting specialists. Published:

Chart of accounts template showing account groups, numbering and postable accounts in a tree
Setup12 min read

Chart of Accounts Template: Structure, Numbering and Standards Compared

A chart of accounts template is a ready-made, numbered list of asset, liability, equity, revenue and expense accounts that matches your reporting standard. Pick one for your standard, keep it short with parties, cost centers and projects, and give every account the right category.

Read guide →

Put this guide into practice

Create your first business and record a balanced entry in a few minutes. New accounts get free credits.