Gifted Real Property Now Sold

In 1994 my mother transferred ownership of her home to her three children and removed herself via a quitclaim. She died in 2003 and one child continued to live in the house and was not charged any rent by the other two.

 

Around 2006, the 1/3 ownership of the child living in the house was purchased by the other two children at the approximate fair market value at the time.  That child continued to live in the house without paying rent.

 

In 2020 the child in the house died, and the two owners sold the house.

 

Over the years, some improvements were made by the two owners, as well as some in preparation for the sale.

 

How is the cost basis for this house determined?  1994 or 2006?  Fair Market Value or Tax valuation at that time?  Besides improvement costs, how is the cost of the 1/3 purchase factored in?