Your new basis using the loan total will be 25,871 ($35,017 - $9,146). I used the loan total since it was more than the cost. This usually happens if there are additional fees on the truck loan which are generally added to basis.
So, on form 8825, you enter the following:
Lines 1 & 2: TRANSPORTATION EQUIPMENT
Lines 3 - 6 of which 4,5 & 6 are usually the same date due to the trade-in on the same date.
Line 7 is usually no unless it is a related party
Skip down to line 16 here you will put the fair market value of the new care $35,017
Line 17 will be $35,017
Line 18 is going to be $25,871
Line 19 will be $9,146
Line 20 - 23 will be 0
Line 24 is $9,146
Line 25 is $25,871
If you have any questions or need further explanation, please do not hesitate to contact me.
The way I looked at it (reading all of the supporting instructions), I think it should be:
Line 15: 16145 (liab assumed)
Line 16: 34471 (cost of new)
Line 18: 41370 (old truck NBV 6354 plus new loan 35016)
Line 19: 9146 realized gain
Line 20: 9146 (smaller of line 15 or 19)
Line 22: 9146 (gain going to form 4797)
Line 23: 9146 (recognized gain)
Line 24: 0 (no deferred gain)
Line 25: 34317 (line 18 and 23 41370+9146 less line 15 16145)
From form 4797 asset held more than 1 year so it goes to schedule D (sole proprietor)
We both should still end with the same result.
Line 15: net liabilities assumed by other party, should be 0 I believe. Did the other party assume liabilities or did you receive cash? Generally in an exchange of vehicle the cash does not go to your bank account. If you received actual cash in hand, it is not an exchange.
Line 16: $34,471
Line 17: $34,471
Line 18: Adjusted basis of like kind property you gave up $6,453 + Change in Liabilities of $35,017 - $16,145 = $25,325
Line 19: Realized Gain $9,146
Line 20 = 0
Line 21 = 0
Line 22 and 23 shouldn't be $9,146. This defeats the purpose of trying to defer the gain. Generally, in a 1031 you will realize the gain of $9,146 but you will not recognize (pay tax on the gain). They should be 0.
Line 24 = $9,146
Line 25 = $25,325
I used your numbers at work on our calculation worksheet and it appears that you should be able to defer the entire gain.