Understand debit and credit
Debit and credit are the two sides of every accounting entry. They do not mean "good" and "bad", and they do not always mean "increase" and "decrease". Their effect depends on the type of account. This page explains the rules and shows how common ERPNext documents balance.
The accounting equation
The balance sheet follows this equation:
Assets = Liabilities + Equity
Income increases profit, and profit increases equity. Expenses reduce profit. This gives the normal behavior of the five root types in the chart of accounts:
| Root type | What it represents | Increases with | Decreases with | Examples |
|---|---|---|---|---|
| Asset | What the company owns or controls | Debit | Credit | Cash, bank, receivables, stock, equipment |
| Liability | What the company owes | Credit | Debit | Payables, loans, tax payable |
| Equity | The owners' interest | Credit | Debit | Capital stock, retained earnings |
| Income | Value earned in a period | Credit | Debit | Sales, service income |
| Expense | Value used in a period | Debit | Credit | Rent, salaries, cost of goods sold |
Assets and expenses normally increase with a debit. Liabilities, equity, and income normally increase with a credit. An account can still have entries on both sides. A customer payment credits receivables because the asset decreases. A sales return debits sales because income decreases.
Debit and credit are not payment directions
The same bank account is debited or credited depending on whether its balance goes up or down:
- A customer pays an invoice. Bank (asset) increases: debit. Receivables (asset) decrease: credit.
- You pay a supplier. Payables (liability) decrease: debit. Bank decreases: credit.
- You buy a laptop for cash. Equipment (asset) increases: debit. Bank decreases: credit.
Examples: one business from funding to closing
The examples use a small trading company and simple values. Your account names can differ. In each case, you create the document and ERPNext creates the entries on submit.
Owner invests capital
The owner invests 25,000 in the company. Record it with a Journal Entry, because it is not a payment against an invoice.
| Account | Debit | Credit |
|---|---|---|
| Bank | 25,000 | |
| Capital Stock | 25,000 |
Credit sale
A Sales Invoice for 1,000 plus 80 tax, to be paid later:
| Account | Debit | Credit |
|---|---|---|
| Accounts Receivable | 1,080 | |
| Sales | 1,000 | |
| Tax Payable | 80 | |
| Total | 1,080 | 1,080 |
Customer pays
A Payment Entry for 1,080, allocated to the invoice. The invoice's outstanding amount becomes zero.
| Account | Debit | Credit |
|---|---|---|
| Bank | 1,080 | |
| Accounts Receivable | 1,080 |
Credit purchase and payment
A Purchase Invoice for 600 of office equipment, then the payment:
| Document | Account | Debit | Credit |
|---|---|---|---|
| Purchase Invoice | Office Equipment | 600 | |
| Purchase Invoice | Accounts Payable | 600 | |
| Payment Entry | Accounts Payable | 600 | |
| Payment Entry | Bank | 600 |
If the purchase is an operating expense, the debit goes to an expense account instead.
Stock received before the supplier bill
With perpetual inventory, a Purchase Receipt for stock worth 700 posts a temporary liability:
| Account | Debit | Credit |
|---|---|---|
| Stock In Hand | 700 | |
| Stock Received But Not Billed | 700 |
The Purchase Invoice then debits Stock Received But Not Billed and credits Accounts Payable.
Stock delivered to a customer
A laptop sold for 1,000 has a valuation cost of 700. The Delivery Note, or a Sales Invoice with Update Stock, posts the cost separately from the sale:
| Account | Debit | Credit |
|---|---|---|
| Cost of Goods Sold | 700 | |
| Stock In Hand | 700 |
ERPNext takes this amount from the stock valuation, not from the selling price. Unsold stock is an asset. Its cost becomes an expense when you sell it, so the expense matches the revenue.
Expense paid at once
Rent of 5,000 and an internet bill of 120, paid from the bank:
| Account | Debit | Credit |
|---|---|---|
| Rent Expense | 5,000 | |
| Internet Expense | 120 | |
| Bank | 5,120 |
Use the most specific document: a Purchase Invoice for a supplier bill, payroll documents for salaries, and a Journal Entry only when no other document fits.
Depreciation
| Account | Debit | Credit |
|---|---|---|
| Depreciation Expense | 100 | |
| Accumulated Depreciation | 100 |
Accumulated depreciation is a contra-asset account. It has a normal credit balance and reduces the net book value of the asset without changing its cost.
Closing the period
At period end, a Period Closing Voucher moves the net balance of the income and expense accounts to a closing account, normally Retained Earnings. For a profit of 20,000:
| Account | Debit | Credit |
|---|---|---|
| Income and expense accounts (net) | 20,000 | |
| Retained Earnings | 20,000 |
A loss reverses the direction.
Contra accounts and unusual balances
A contra account offsets another account and stays visible on its own. Examples are accumulated depreciation, sales returns, and allowances.
An unexpected balance is not always wrong:
- A customer with a credit balance can have an advance or an overpayment.
- A supplier with a debit balance can have an advance paid.
- A bank account with a credit balance can be an overdraft.
- An income account can be debited by a Credit Note.
Check the source documents before you decide that a sign is wrong.
Parties and control accounts
ERPNext normally posts all customers to one receivable account and all suppliers to one payable account. The Party Type and Party on each ledger entry identify whose balance changed. You do not need one account for each customer. The Accounts Receivable and Accounts Payable reports show balances by party. Learn more in Set receivable and payable accounts.
Dimensions do not change debit and credit
A cost center, a project, or another accounting dimension tags an entry for analysis. It does not change the account or the side of the entry. One rent account can be split across three cost centers, and the ledger stays balanced.
Check the entries of a document
- Open the submitted document.
- Select View > Accounting Ledger (on a Journal Entry or a Payment Entry, View > Ledger).
- Check that the debit and credit totals are equal.
- Check that each account matches the business event, and that receivable and payable rows have the correct party.
- Check the cost center, project, finance book, and other dimensions.
The Trial Balance report confirms that total debits equal total credits for a period. A balanced total does not prove that every account is correct.
Common mistakes
| Mistake | Better approach |
|---|---|
| Reading debit as "money received" | Find the account type, then ask whether the balance went up or down. |
| Reading credit as a negative amount | Debit and credit are sides of an entry, not signs. |
| One receivable account for each customer | Use one control account. The party identifies the customer. |
| Fixing an invoice with an unrelated Journal Entry | Return, cancel, or amend the invoice so the documents and the ledger agree. |
| Checking only that the totals balance | Also check accounts, parties, dates, dimensions, taxes, and currencies. |
Frequently asked questions
Does every entry affect exactly two accounts?
No. Double entry needs equal totals, not two rows. An invoice with several taxes, income accounts, and stock can create many GL entries.
Can I enter a negative debit?
Use the opposite side instead. For a reversal, use the document's return or cancel workflow.
Can I use a Journal Entry instead of invoices and payments?
Use invoices and Payment Entries for routine sales, purchases, and payments. They update outstanding amounts, party balances, stock, taxes, and reports. Use a Journal Entry for adjustments.