We measure the power spectrum of galaxy clustering in real space from the APM Galaxy Survey . We present an improved technique for the numerical inversion of Limber ’ s equation that relates the angular clustering of galaxies to an integral over the power spectrum in three dimensions . Our approach is underpinned by a large ensemble of mock galaxy catalogues constructed from the Hubble Volume N-body simulations . The mock catalogues are used to test for systematic effects in the inversion algorithm and to estimate the errors on our measurement . We find that we can recover the power spectrum to an accuracy of better than 15 \% over three decades in wavenumber . A key advantage of the use of mock catalogues to infer errors is that we can apply our technique on scales for which the density fluctuations are not Gaussian , thus probing the regime that offers the best constraints on models of galaxy formation . On large scales , our measurement of the power spectrum is consistent with the shape of the mass power spectrum in the popular “ concordance ” cold dark matter model . The galaxy power spectrum on small scales is strongly affected by nonlinear evolution of density fluctuations , and , to a lesser degree , by galaxy bias . The rms variance in the galaxy distribution , when smoothed in spheres of radius 8 h ^ { -1 } Mpc , is \sigma ^ { g } _ { 8 } = 0.96 ^ { +0.17 } _ { -0.20 } and the shape of the power spectrum on large scales is described by a simple fitting formula with parameter \Gamma = 0.19 ^ { +0.13 } _ { -0.04 } ( these errors are the 1 \sigma ranges for a two parameter fit ) . We use our measurement of the power spectrum to estimate the galaxy two point correlation function ; the results are well described by a power law with correlation length r _ { 0 } = 5.9 \pm 0.7 h ^ { -1 } Mpc and slope \gamma = 1.61 \pm 0.06 for pair separations in the range 0.1 < r / ( h ^ { -1 } { Mpc } ) < 20 .