Abstract: I will present recent results on the computation of finite N effects in supergravity in the context of AdS2/CFT1 and AdS4/ABJM holography. I will show how to use localisation to compute all perturbative and nonperturbative charge corrections to the entropy of supersymmetric black holes including complicated number theoretic objects called Kloosterman sums. These are essential to recover an integer which can be identified as the number of black hole ground states. I will then explain how these techniques can be used on M-theory on AdS4xS^7 to compute the exact perturbative AdS4 partition function, the Airy function, as predicted from ABJM theory on a three sphere.