Df calculation