In this paper we present an exact general analytic expression Z ( sSFR ) = { y _ { Z } \over \Lambda ( sSFR ) } + I ( sSFR ) linking the gas metallicity Z to the specific star formation rate ( sSFR ) , that validates and extends the approximate relation put forward by Lilly et al . ( 2013 , L13 ) , where y _ { z } is the yield per stellar generation , \Lambda ( sSFR ) is the instantaneous ratio between inflow and star formation rate expressed as a function of the sSFR , and I is the integral of the past enrichment history , respectively . We then demonstrate that the instantaneous metallicity of a self-regulating system , such that its sSFR decreases with decreasing redshift , can be well approximated by the first term on the right-hand side in the above formula , which provide an upper bound to the metallicity . The metallicity is well approximated also by Z _ { L 13 } ^ { id } = Z ( sSFR ) = { y _ { Z } \over 1 + \eta + sSFR / \nu } ( L13 ideal regulator case ) , which provides a lower bound to the actual metallicity . We compare these approximate analytic formulae to numerical results and infer a discrepancy < 0.1 dex in a range of metallicities ( log ( Z / Z _ { \odot } ) \in [ -1.5 , 0 ] , for y _ { z } \equiv Z _ { \odot } = 0.02 ) and almost three orders of magnitude in the sSFR . We explore the consequences of the L13 model on the mass-weighted metallicity in the stellar component of the galaxies . We find that the stellar average metallicity lags \sim 0.1 - 0.2 dex behind the gas-phase metallicity relation , in agreement with the data .