In algebraic geometry, the Grothendieck trace formula expresses the number of points of a variety over a finite field in terms of the trace of the Frobenius endomorphism on its cohomology groups. There are several generalizations: the Frobenius endomorphism can be replaced by a more general endomorphism, in which case the points over a finite field are replaced by its fixed points, and there is also a more general version for a sheaf over the variety, where the cohomology groups are replaced by cohomology with coefficients in the sheaf.