We studied the effects of the SHBG (TAAAA) n and androgen receptor gene [AR] (CAG) n allele length on endocrine-metabolic features and body composition (by dual-energy X-ray absorptiometry) before and after 1 year on metformin (850 mg/d) in 70 girls with polycystic ovary syndrome after precocious pubarche; allele lengths were assessed by polymerase chain reaction in both patients and in population control subjects (n = 107). Longer SHBG (TAAAA) n alleles (>8 repeats) were associated with more improvement of the lipid profile after 1 year on metformin, whereas longer AR (CAG) n alleles were related to more normalization of the androgen and lipid levels after therapy; longer alleles in both genes had an additive effect on the beneficial changes of SHBG, T, and lipids after metformin.