Funding Information: We thank Koushik Swaminathan, Pham Nguyen Minh, Riku Tuovinen, Ville Pyykkönen, Jami Kinnunen, Kukka-Emilia Huhtinen, Päivi Törmä and Giovanni Vignale for useful discussions and proofreading. This work has been supported by the Academy of Finland under Grant Nos. 330384 and 336369.The superfluid weight is an important observable of superconducting materials since it is related to the London penetration depth of the Meissner effect. It can be computed from the change in the grand potential (or free energy) in response to twisted boundary conditions in a torus geometry. Here we review the Bardeen-Cooper-Schrieffer mean-field theory emphasizing its origin as a variational approximation for the grand potential. The variatio...