calculate the temperature at the two