When a fixed asset or plant asset is sold, the asset's depreciation expense must be recorded up to the date of the sale. Next, 1) the asset's cost and accumulated depreciation is removed, 2) the amount received is recorded, and 3) any difference is reported as a gain or loss.
Here's an example. A company sells one of its machines on January 31 for $5,000. The last time depreciation was recorded was on December 31. Depreciation expense is $400 per month. The general ledger shows the machine's cost was $50,000 and its accumulated depreciation at December 31 was $40,000.
On January 31 the company will debit Depreciation Expense for $400 and will credit Accumulated Depreciation for $400 in order to record the depreciation during January. In its next entry on January 31, the company will debit Cash for $5,000 (the amount received); debit Accumulated Depreciation for $40,400 (the balance at January 31); debit Loss of Disposal of Asset $4,600; and credit Machines for $50,000.
Let's step back and review the disposal of the machine. As of January 31, the machine's book value is $9,600 (cost of $50,000 minus its accumulated depreciation of $40,400). Because the asset is sold, the $9,600 of book value or carrying value is removed from the accounts. In its place, the company received and records the cash of $5,000. Since the company received $4,600 less than the amount it removed, it will report a loss of $4,600.
If the company had received more cash than the asset's book value, it would report the difference as a credit to Gain on Disposal of Asset.