The magnitude of finite categories is a generalization of the Euler characteristic. It is defined using the coarse incidence algebra of rational-valued functions on the given finite category, and a distinguished element in this algebra: the Dirichlet zeta function. The incidence algebra may be identified with the algebra of n×n matrices over the rational numbers, where n is the cardinality of the underlying object set. The Moore-Penrose pseudoinverse of a matrix is a generalization of the inverse; it exists and is unique for any given matrix over the complex numbers. In this article, we derive a new method for calculating the magnitude of a finite category, using the pseudoinverse of the matrix that corresponds to the zeta function. The magnitude equals the sum of the entries of this pseudoinverse.