Two factors are mainly responsible for the stability of the DNA double helix: base pairing between complementary strands and stacking between adjacent bases. By studying DNA molecules with solitary nicks and gaps we measure temperature and salt dependence of the stacking free energy of the DNA double helix. For the first time, DNA stacking parameters are obtained directly (without extrapolation) for temperatures from below room temperature to close to melting temperature. We also obtain DNA stacking parameters for different salt concentrations ranging from 15 to 100 mM Na+. From stacking parameters of individual contacts, we calculate base-stacking contribution to the stability of A*T- and G*C-containing DNA polymers. We find that temperature and salt dependences of the stacking term fully determine the temperature and the salt dependence of DNA stability parameters. For all temperatures and salt concentrations employed in present study, base-stacking is the main stabilizing factor in the DNA double helix. A*T pairing is always destabilizing and G*C pairing contributes almost no stabilization. Base-stacking interaction dominates not only in the duplex overall stability but also significantly contributes into the dependence of the duplex stability on its sequence.