Housing loan is not included in cost of acquisition and you have to take only the purchase price of house after applying indexation as a cost of acquisition. You can claim deduction of principal paid of loan in 80C and interest paid of loan in 24(b).
Like my reply if you are satisfied so that I'll be motivated to answer more 🙂
The interest paid on housing loan can be added to the cost of acquisition at the time of sale of house as it's considered as cost for acquiring the house.