An implementation of coupled-cluster (CC) theory to treat atoms and molecules in finite magnetic fields is presented. The main challenges stem from the magnetic-field dependence in the Hamiltonian, or, more precisely, the appearance of the angular momentum operator, due to which the wave function becomes complex and which introduces a gauge-origin dependence. For this reason, an implementation of a complex CC code is required together with the use of gauge-including atomic orbitals to ensure gauge-origin independence. Results of coupled-cluster singles--doubles--perturbative-triples (CCSD(T)) calculations are presented for atoms and molecules with a focus on the dependence of correlation and binding energies on the magnetic field.