Making devices with graphene necessarily involves making contacts with metals. We use density functional theory to study how graphene is doped by adsorption on metal substrates and find that weak bonding on Al, Ag, Cu, Au and Pt, while preserving its unique electronic structure, can still shift the Fermi level with respect to the conical point by $sim 0.5$ eV. At equilibrium separations, the crossover from $p$-type to $n$-type doping occurs for a metal work function of $sim 5.4$ eV, a value much larger than the graphene work function of 4.5 eV. The numerical results for the Fermi level shift in graphene are described very well by a simple analytical model which characterizes the metal solely in terms of its work function, greatly extending their applicability.