We provide a unified description of the valley Zeeman effect (g-factor) and Landau levels in monolayer transition metal dichalcogenides using the Luttinger-Kohn approximation with spinorbit coupling in the Hamiltonian. The Landau level indices are symmetric in the K and K valleys and the Landau level energy spacings are linear in the magnetic field strength. Besides the valley, atomic and spin contributions to the g-factor, we find an additional cross term due to coupling between the valley and atomic terms. We develop an approach to compute the Berry curvature and g-factors from density functional theory including spin-orbit coupling, without the need for unoccupied states. Self-energy corrections within the static GW approximation are added in the calculation of the g-factors. Our first principles results give spin-and valley-split Landau levels, in agreement with recent optical experiments. The exciton g-factors deduced in this work are also in good agreement with experiment for the bright and dark excitons in monolayer WSe 2 , as well as the lowest-energy bright excitons in MoSe 2 -WSe 2 heterobilayers with different twist angles.