We derive a simple formula for the action of any supersymmetric solution to minimal gauged supergravity in the AdS$_4$/CFT$_3$ correspondence. Such solutions are equipped with a supersymmetric Killing vector, and we show that the holographically renormalized action may be expressed entirely in terms of the weights of this vector field at its fixed points, together with certain topological data. In this sense, the classical gravitational partition function localizes in the bulk. We illustrate our general formula with a number of explicit examples, in which exact dual field theory computations are also available, which include supersymmetric Taub-NUT and Taub-bolt type spacetimes, as well as black hole solutions. Our simple topological formula also allows us to write down the action of any solution, provided it exists.