Based on roof layout, runoff volume, drainage path, foundation protection, and how the home actually sheds water. Downspout layout should be designed, not guessed.