Cap gains

my wife and i own a house with my daughter and son-in-law. We are all on title and the loan. My daughter and  son in law live in the house and we split all costs.( payment taxes insurance).  When we sell the house or they refinance and buy us out of loan do me and my wife have to pay cap gains.