A ladder should extend at least 3 feet above the roof's edge to provide a secure handhold when transitioning from the roof to the ladder. Also, ensure the ladder's height is appropriate for the specific roof you are working on.