We develop an improved mass tracer for clusters of galaxies from optically observed parameters, and calibrate the mass relation using weak gravitational lensing measurements. We employ a sample of ∼13 000 optically selected clusters from the Sloan Digital Sky Survey (SDSS) maxBCG catalogue, with photometric redshifts in the range 0.1–0.3. The optical tracers we consider are cluster richness, cluster luminosity, luminosity of the brightest cluster galaxy (BCG) and combinations of these parameters. We measure the weak lensing signal around stacked clusters as a function of the various tracers, and use it to determine the tracer with the least amount of scatter. We further use the weak lensing data to calibrate the mass normalization. We find that the best mass estimator for massive clusters is a combination of cluster richness, N200, and the luminosity of the BCG, LBCG: , where is the observed mean BCG luminosity at a given richness. This improved mass tracer will enable the use of galaxy clusters as a more powerful tool for constraining cosmological parameters.