Lengthy expansions of trinucleotide repeats are found in DNA of patients suffering severe neurodegenerative age-related diseases. Using a synthetic self-priming DNA, containing CAG and CTG repeats implicated in Huntington's disease and several other neurological disorders, we measure the equilibrium distribution of hairpin folding and generate triplet repeat expansions by polymerase-catalyzed extensions of the hairpin folds. Expansions occur by slippage in steps of two CAG triplets when the self-priming sequence (CTG)16(CAG)4 is extended with proofreading-defective Klenow fragment (KF exo-) from Escherichia coli DNA polymerase I. Slippage by two triplets is 20 times more frequent than by one triplet, in accordance with our finding that hairpin loops with even numbers of triplets are 1-2 kcal/mol more stable than their odd-numbered counterparts. By measuring triplet repeat expansions as they evolve over time, individual rate constants for expansion from 4 to 18 CAG repeats are obtained. An empirical expression is derived from the data, enabling the prediction of slippage rates from the ratio of hairpin CTG/CTG interactions to CAG/CTG interactions. Slippage is initiated internally in the hairpin folds in preference to melting inward from the 3' terminus. The same triplet expansions are obtained using proofreading-proficient KF exo+, provided 10-100-fold higher dNTP concentrations are present to counteract the effect of 3'-exonucleolytic proofreading.