Two selected members of the homologous series An+2BBn′O3n+3 (A=Sr and Ca; B and B′=Co) have been investigated for their crystal structures because of their potential applications as thermoelectric materials. A combined Rietveld refinement and spin-polarized magnetic geometry optimization technique was employed for the structural studies. Both the n=3 member, (Sr0.8Ca0.2)5Co4O12, and the n=4 member, Sr6Co5O15, have distorted hexagonal perovskite-related structures that possess one-dimensional cobalt oxide chains separated by alkaline-earth cations. The linear chains consist of one unit of CoO6 trigonal prism alternating with n units of CoO6 octahedra. Crystal structures and reference powder X-ray diffraction patterns of (Sr0.8Ca0.2)5Co4O11 [P3c1, a=9.4196(2) Å, c=19.9857(6) Å, V=825.83 Å3, and Dx=5.358 g/cm3] and Sr6Co5O15 [R32, a=9.497 64(12) Å, c=12.3956(2) Å, V=968.34 Å3, and Dx=5.455 g/cm3] are reported.