Suppose *M* is a compact two-dimensional orientable Riemannian manifold with boundary ∂*M*. Denote by *K* the Gaussian curvature at points of *M*, and by *k*_{g} the geodesic curvature at points of ∂*M*. Then

- ∫
_{M}*K*d*A*+ ∫_{∂M}*k*_{g}d*s*= 2&pi χ(*M*)

The theorem applies in particular if the manifold does not have a boundary, in which case the integral ∫_{∂M} *k*_{g} d*s* can be omitted.

If one bends and deforms the manifold *M*, its Euler characteristic will not change, while the curvatures at given points will. The theorem requires, somewhat surprisingly, that the total integral of all curvatures will remain the same.

A generalisation to *n* dimensions was found in the 1940s, by Allendoerfer, Weil, and Chern.