In double-entry bookkeeping, a gain is a credit. Recording a gain increases your company’s equity, and equity accounts increase on the credit side of the ledger. When you sell an asset for more than its book value, the gain appears as a credit, the cash or other proceeds come in as a debit, and the old asset and its accumulated depreciation are cleared off the books at the same time.
Why a Gain Sits on the Credit Side
Every ledger account has a normal balance, meaning the side where increases are recorded. Assets and expenses increase with debits. Liabilities, equity, and revenue increase with credits. A gain account belongs to the equity family because a gain adds to the owners’ residual interest in the business, so it increases with a credit.
Picture what actually happens when you sell an old piece of equipment for more than its book value. The business is worth more after the sale than before. That increase in net worth belongs to the owners, and it lands on the credit side of the ledger alongside every other equity increase. A debit to a gain account would reduce it, which is uncommon and usually reserved for correcting an error or reversing a gain you recorded earlier.
At the end of the period, the balance in the gain account closes into retained earnings, permanently lifting the equity shown on the balance sheet. That is the same closing treatment used for revenue accounts, which is a useful reminder that gains and revenue both raise equity. They just come from different sources.
What Counts as a Gain
A gain is an increase in equity that comes from something outside your regular operations. The Financial Accounting Standards Board defines gains as increases in equity from “peripheral or incidental transactions,” which distinguishes them from revenue earned in the ordinary course of business.1Financial Accounting Standards Board (FASB). Statement of Financial Accounting Concepts No. 6 A retail store selling inventory earns revenue. That same store selling an old delivery truck at a profit records a gain.
Typical examples include selling equipment your business no longer needs, disposing of a building you have outgrown, or collecting an insurance payout that exceeds the book value of a damaged asset. In each case, the gain is the amount by which what you received exceeds what the asset was worth on your books at the time of the transaction.
One boundary worth noting: this is the treatment for a realized gain, meaning you actually sold or disposed of the asset. An unrealized gain — where an asset’s market value has risen but you still own it — is handled differently depending on the asset type, and long-lived assets like buildings and equipment are never written up on the balance sheet while you still hold them. The credit-side journal entry described here applies once a sale or disposal actually happens.
Figures You Need Before You Post the Entry
Three numbers drive the journal entry, and you pull each from your existing records or from the sale itself.
- Historical cost: the original purchase price of the asset, including setup, shipping, or installation costs capitalized at acquisition.
- Accumulated depreciation: total depreciation recorded against the asset over its life. Historical cost minus accumulated depreciation gives you the book value, also called the carrying amount.
- Amount realized: total value received from the buyer — cash, property, assumed debt, or any combination — minus selling expenses. The IRS requires you to subtract selling costs such as legal fees, appraisal costs, and advertising from the gross proceeds.2Internal Revenue Service. Publication 544, Sales and Other Dispositions of Assets
If the amount realized is greater than book value, the difference is your gain. If it is less, you have a loss. The Internal Revenue Code frames the same calculation as the excess of the amount realized over the property’s adjusted basis.3Office of the Law Revision Counsel. 26 USC 1001 – Determination of Amount of and Recognition of Gain or Loss
Building the Journal Entry
Recording a gain does more than post the profit. You also have to clear the old asset off the books and remove the depreciation history tied to it. Four lines do that work.
- Debit Cash (or the other asset received) for the full amount of proceeds.
- Debit Accumulated Depreciation for the balance associated with the asset being sold. This zeroes out its depreciation history.
- Credit the original asset account at its full historical cost. This takes the asset off the balance sheet.
- Credit Gain on Sale for the balancing figure.
The gain line is what makes total debits equal total credits. If your arithmetic on the first three lines is correct, the gain simply falls out as the difference.
Worked Example
Your company sells a piece of equipment that originally cost $50,000. Accumulated depreciation is $35,000, so the book value is $15,000. You sell it for $22,000 in cash. The gain is $22,000 − $15,000, or $7,000. The entry:
- Debit Cash: $22,000
- Debit Accumulated Depreciation: $35,000
- Credit Equipment: $50,000
- Credit Gain on Sale of Equipment: $7,000
Total debits are $57,000. Total credits are $57,000. The equipment and its depreciation come off the books, cash goes on, and the $7,000 gain flows through to equity when the account is closed.
When It’s a Loss, the Sides Flip
If the same equipment sold for $10,000 instead of $22,000, you would have a $5,000 loss ($10,000 − $15,000 book value). A loss account has a debit normal balance because it reduces equity. The entry becomes:
- Debit Cash: $10,000
- Debit Accumulated Depreciation: $35,000
- Debit Loss on Sale of Equipment: $5,000
- Credit Equipment: $50,000
Total debits are $50,000 and total credits are $50,000. The structure is identical to the gain entry, except the credit to Gain on Sale is replaced by a debit to Loss on Sale. Gains are always credits. Losses are always debits. Everything else stays the same.
How the Entry Keeps the Accounting Equation Balanced
The accounting equation — Assets equal Liabilities plus Equity — has to hold after every transaction. When you sell an asset at a gain, cash coming in exceeds the book value of the asset going out, so total assets rise on a net basis. No new liability is created, so the balancing figure has to appear in equity, and it does, through the credit to the gain account.
In the worked example, assets rose by a net $7,000 (cash up $22,000, equipment net of depreciation down $15,000). Equity rose by the same $7,000 through the gain. The books balance, and the financial statements show that the business grew wealthier from a non-operating source.
Bookkeeping Answer Versus Tax Answer
Booking the gain as a credit is only the ledger side of the story. For tax purposes, gains from selling business property are reported on Form 4797 rather than Schedule D, and the character of the gain depends on the property type and holding period.4Internal Revenue Service. 2025 Instructions for Form 4797 – Sales of Business Property Depreciable business property and real estate held more than a year fall under Section 1231, which can route a net gain into long-term capital gain treatment.5Office of the Law Revision Counsel. 26 USC 1231 – Property Used in the Trade or Business and Involuntary Conversions Section 1245 then pulls back the portion of a gain attributable to prior depreciation and taxes it as ordinary income.6Office of the Law Revision Counsel. 26 USC 1245 – Gain From Dispositions of Certain Depreciable Property Those rules affect what you owe, not how you post the entry. The credit to Gain on Sale is the same whether the gain will ultimately be taxed at ordinary or capital rates.