We prove a formula, conjectured by Zagier, for the $S_n$-equivariant Euler characteristic of the top weight cohomology of $M_{g,n}$.