No, you do not use the loan amount.
To determine the Basis of a home that you built, it will include:
- It's the cost of the land,
- plus the cost of the construction and (contracted labor plus material & supplies)
- permits & architectural drawings
- any other improvements to the land (bringing in a sewer, water, gas, etc.),
- plus any further permanent improvements since construction.
You can not count the value of your own labor if you did the work yourself.