The deoxyribonucleotide fragments, d(GCGAAAGC) and d(GCGAAGC) form extraordinarily stable mini-hairpin structures containing only two G-C pairs. In contrast, the corresponding ribonucleotide fragments, r(GCGAAAGC) and r(GCGAAGC) are not so stable, although they also form mini-hairpin structures. The stability difference between these DNA and RNA mini-hairpins was examined by NMR studies and the molecular mechanics calculations, and by comparing with the stability of several sequence variants. Their stability was deduced to vary delicately depending on helical patterns formed by DNA (B form) and RNA (A form) structures.