In July 1925 Heisenberg published a paper that ushered in the new era of quantum mechanics. This epoch-making paper is generally regarded as being difficult to follow, partly because Heisenberg provided few clues as to how he arrived at his results. We give details of the calculations of the type that Heisenberg might have performed. As an example we consider one of the anharmonic oscillator problems considered by Heisenberg, and use our reconstruction of his approach to solve it up to second order in perturbation theory. The results are precisely those obtained in standard quantum mechanics, and we suggest that a discussion of the approach, which is based on the direct calculation of transition frequencies and amplitudes, could usefully be included in undergraduate courses on quantum mechanics.