In this study, we present a detailed theoretical investigation of the effect of an externally applied magnetic field on the energy states 1s, 1p, 1d and 1f in the spherical quantum dot with finite and infinite confinement potentials. For both finite and infinite spherical quantum dot, the first four electron energies, Zeeman transition energies between these electronic states and optical absorption coefficients between the related states with and without magnetic field are investigated. The results show that the confinement potential, magnetic field and dot radius have a strong effect on energy states, Zeeman transition energies and absorption coefficients especially in the large dot radii. In the small dot radii, energy levels are relatively insensitive to the magnetic field because the spatial confinement of the electron prevails over the magnetic confinement. As Delta m changes from -1 to +1, the peak positions of the optical absorptions shift to higher energy values (blue shift). The absorption peaks for the infinite quantum dot are localised in higher photon energies those that of the finite quantum dot. The magnetic field causes that the degeneration of energies to be removed and the peak positions of transitions corresponding to Delta m = +1 shift towards to blue in contrast to the cases of Delta m = -1 and Delta m = 0.