No math required - just arithmetic :-).
If you want a 1/4" border at each end, the center of each of the end holes has to be 5/8" (1/4" + 3/8") from its end.
That leaves 4 3/4" between those 2 holes. In that space you have to put
4 more holes with 5 spaces between holes. 4 3/4" divided by 5 gives a spacing of just over 15/16" (4.75 / 5 = 0.95).Since that doesn't come out even, you need to take the slop (1/16") and redistribute it to each end. So instead of the centers of the end holes being 5/8" from the end, they should be 21/32" from the end.
Or you could just ignore the slop and have one space be 1/16" wider than the others :-).
I hope you're aware that those holes are only going to have 3/16" of wood between each pair.