During the past 15 years, the density matrix renormalization group (DMRG) has become increasingly important for ab initio quantum chemistry. Its underlying wavefunction ansatz, the matrix product state (MPS), is a low-rank decomposition of the full configuration interaction tensor. The virtual dimension of the MPS, the rank of the decomposition, controls the size of the corner of the many-body Hilbert space that can be reached with the ansatz. This parameter can be systematically increased until numerical convergence is reached. The MPS ansatz naturally captures exponentially decaying correlation functions. Therefore DMRG works extremely well for noncritical one-dimensional systems. The active orbital spaces in quantum chemistry are however often far from one-dimensional, and relatively large virtual dimensions are required to use DMRG for ab initio quantum chemistry (QC-DMRG). The QC-DMRG algorithm, its computational cost, and its properties are discussed. Two important aspects to reduce the computational cost are given special attention: the orbital choice and ordering, and the exploitation of the symmetry group of the Hamiltonian. With these considerations, the QC-DMRG algorithm allows to find numerically exact solutions in active spaces of up to 40 electrons in 40 orbitals.