Abstract The JWST is allowing new measurements of gas-phase metallicities in galaxies between cosmic noon and cosmic dawn. The most robust approach uses luminosity ratios between the excited auroral transition, [O iii] 4364 Å, and the lower [O iii] 5008 Å/4960 Å lines to determine the gas temperature. The ratio of the luminosities in the latter transitions to those in hydrogen Balmer series lines then yield relatively clean metallicity estimates. In the absence of detection of the [O iii] auroral line, the ratios of various [O iii], [O ii], [N ii], and Balmer lines are used to determine metallicities. Here we present a refined approach for extracting metallicities from these “strong line diagnostics”. Our method exploits empirical correlations between the temperature of O iii/O ii regions and gas-phase metallicity. We then show, from first principles, how to extract metallicities and break degeneracies in these estimates using traditional strong line diagnostics, R2, R3, R23, and O3O2, and N2O2. We show that these ratios depend also on volume correction factors, i.e. on accounting for the fraction of the volume of HII regions that are in O iii and O ii, but that these can be determined self-consistently along with the metallicities. We quantify the success of our method using metallicities derived from galaxies with auroral line determinations and show that it generally works better than previous empirical approaches. The scatter in the observed line ratios and redshift evolution are largely explained by O3O2 variations. We provide publicly available routines for extracting metallicities from strong line diagnostics using our methodology.