Financial analysis of building replacement