There are three golden rules of accounting on which whole accounting is based. There are three types of accounts and all of them have their respective rules for posting.

1. REAL ACCOUNT: This account is related to assets .
Its rule is Debit what comes in
Credit what goes out.

2. NOMINAL ACCOUNT: It is related to various expenses, incomes, losses and gains. Its rule is
Debit all expenses and losses
Credit all incomes and gains

3. PERSONAL ACCOUNT: It is related to persons or body of individuals or association of persons. Its rule is
Debit the Receiver
Credit the Giver

These are essential rules of accounting.