Where to capo for D major
Put the capo at fret 7 and play D major using G major shapes. That is the easiest of the eight positions ranked below, and it is what most players reach for. Against playing D major open, it drops the mean difficulty of the key's seven chords from 3.9 to 3.4 and gains 0 ringing open strings.
You want D. Capo 7 and play in G.
All eight positions, ranked
Each row transposes D major down by that many frets to find the shapes your hand would actually make, then scores the best voicing of all seven chords — fewer fingers, less stretch, closer to the nut, fewer muted strings. Lower is easier. Standard tuning (E2 A2 D3 G3 B3 E4).
What you are playing
The seven chords of D major are D, Em, F#m, G, A, Bm, C#dim — the ones the ranking above is scored against. Their diagrams are on the D major key page.