So I have a SF house that we will have owned (and lived in) for two years here fairly shortly.

IF after 2 years of living in it, we tear the house down, scrape it, rebuild on the same lot and sell it for say a 400K gain, is the gain taxable?