We present a calibration of the metallicity and physical parameters (temperature, luminosity, gravity, mass, radius) for RR Lyrae stars using the ugriz SDSS photometric system. Our work is based on calculations of synthetic horizontal branches (HBs), fully taking into account evolutionary effects for a wide range in metallicities and HB morphologies. We provide analytical fits that are able to provide all quantities mentioned with very high (internal) precision, based solely on mean SDSS magnitudes and colors.