A practical use of the entanglement entropy in a 1D quantum system is to identify the conformal field theory describing its critical behavior. It is exactly (c/3)lnℓ for an interval of length ℓ in an infinite system, where c is the central charge of the conformal field theory. Here we define the geometric mutual information, an analogous quantity for classical critical points. We compute this for 2D conformal field theories in an arbitrary geometry, and show in particular that for a rectangle cut into two rectangles, it is proportional to c. This makes it possible to extract c in classical simulations, which we demonstrate for the critical Ising and three-state Potts models.