Nucleic acids are linear, unbranched polymers of nucleotides. Nucleotides consist of three parts.

A five-carbon sugar (hence a pentose). Two kinds are found:
- deoxyribose, which has a hydrogen atom attached to its #2 carbon atom (designated 2'), and
- ribose, which has a hydroxyl group there.
Deoxyribose-containing nucleotides, the deoxyribonucleotides, are the monomers of deoxyribonucleic acids (DNA). Ribose-containing nucleotides, the ribonucleotides, are the monomers of ribonucleic acids (RNA).

The Purines The Pyrimidines
A nitrogen-containing ring structure called a nucleobase (or simply a base). The nucleobase is attached to the 1' carbon atom of the pentose. In DNA, four different nucleobases are found:
- two purines, called adenine (A) and guanine (G)
- two pyrimidines, called thymine (T) and cytosine (C)
RNA contains:
- The same purines, adenine (A) and guanine (G).
- RNA also uses the pyrimidine cytosine (C), but instead of thymine, it uses the pyrimidine uracil (U).
Nucleoside
The combination of a nucleobase and a pentose is called a nucleoside.

One (as shown in the first figure), two, or three phosphate groups. These are attached to the 5' carbon atom of the pentose. The product in each case is called a nucleotide. Both DNA and RNA are assembled from nucleoside triphosphates.
- For DNA, these are dATP, dGTP, dCTP, and dTTP.
- For RNA, these are ATP, GTP, CTP, and UTP.
In both cases, as each nucleotide is attached, the second and third phosphates are removed.
| Nucleobase | Nucleoside | Nucleotides | |||
|---|---|---|---|---|---|
| DNA | Adenine (A) | Deoxyadenosine | dAMP | dADP | dATP |
| Guanine (G) | Deoxyguanosine | dGMP | dGDP | dGTP | |
| Cytosine (C) | Deoxycytidine | dCMP | dCDP | dCTP | |
| Thymine (T) | Deoxythymidine | dTMP | dTDP | dTTP | |
| RNA | Adenine (A) | Adenosine | AMP | ADP | ATP |
| Guanine (G) | Guanosine | GMP | GDP | GTP | |
| Cytosine (C) | Cytidine | CMP | CDP | CTP | |
| Uracil (U) | Uridine | UMP | UDP | UTP | |