Step 1.
Figure the smaller of (a) the depreciation allowed or allowable, or (b) the total gain for the sale. This is the smaller of line 22 or line 24 of your 2025 Form 4797 (or the comparable lines of Form 4797 for the year of sale) for the property.