In 1912 Hans finished secondary education (HBS) in Rotterdam, and studied mathematics and physics at the University of Leiden, where he obtained a master's degree in 1916. Kramers wanted to obtain foreign experience during his doctoral research, but his first choice of supervisor, Max Born in Göttingen, was not reachable because of the First World War. Because Denmark was neutral in this war, as was the Netherlands, he travelled (by ship, overland was impossible) to Copenhagen, where he visited unannounced the then still relatively unknown Niels Bohr. Bohr took him on as a Ph.D. candidate and Kramers prepared his dissertation under Bohr's direction. Although Kramers did most of his doctoral research (on intensities of atomic transitions) in Copenhagen, he obtained his formal Ph.D. under Ehrenfest in Leiden, on 8 May 1919.