The two steps
Step 1, recoverability. Compare the carrying amount with the sum of the undiscounted future cash flows expected from using and finally disposing of the asset or group. Use the entity's own assumptions, over the remaining life of the group's primary asset (its main cash-generating asset), assuming the group is sold at that point if other assets would last longer. Cash flows for interest, and for an asset retirement obligation already recognized, are left out. If the undiscounted total is at least the carrying amount, stop: there is no loss, even if fair value is lower.
Step 2, measurement. If the carrying amount exceeds the undiscounted cash flows, the loss is carrying amount minus fair value. Costs to sell are not deducted for an asset held and used.
Example: a bottling line has cost 3,800,000 and accumulated depreciation 1,400,000, so its carrying amount is 2,400,000. After a key customer leaves, expected undiscounted cash flows fall to 2,100,000, below the carrying amount, so the line fails Step 1. Its fair value is 1,750,000, so the loss is 2,400,000 - 1,750,000 = 650,000. Had the undiscounted cash flows been 2,500,000, there would be no loss, though fair value is still 1,750,000.