A growing body of literature suggests that the ratio between the second and fourth digits of the hands (2D:4D ratio) is associated with exposure to prenatal sex hormones in a variety of animals including primates. Female baboons form dominance hierarchies composed of matrilines of related individuals, and the social mechanisms contributing to the structure of these hierarchies have been well studied. We here investigated the relationship between inferred prenatal androgen effects (PAE) and female rank in a captive troop of Hamadryas baboons (Papio hamadryas) with a typical social structure and three captive groups of chacma baboons (Papio ursinus) made up entirely of unrelated orphans. Low 2D:4D ratios (high inferred PAE) were associated with higher-ranking females and high 2D:4D ratios (low inferred PAE) with lower-ranking females in both focal species. This negative correlation between 2D:4D ratio and rank suggests prenatal androgens are linked with the maintenance of female ranks within matrilines in troops with a natural social structure and to the ranks acquired by orphan females.