We used the SDSS magnitudes of about 1.5 million F and G type main-sequence stars with metallicity and distances and estimated vertical metallicity gradients for middle/high Galactic-latitude fields of the Milky Way. The vertical metallicity gradients estimated for stars with three different galactocentric distance intervals. Thin disc with a vertical metallicity gradient -0.308 +/- 0.018 dex kpc-1, is dominant only in distance interval 6 < R = 10 kpc, while thick disc could be observed in the distance intervals 6 < R = 10 and 10 < R = 15 kpc with vertical metallicity gradients are d[ Fe/H]/dz = -0.164 +/- 0.014 and d[ Fe/H]/dz = -0.172 +/- 0.016 dex kpc-1, respectively. Vertical metallicity gradients for stars in distance interval 15 < R = 20 kpc, where the halo component dominates, is almost zero. Metallicity gradients obtained in this study are also compared with the Galaxia model. The comparison is a good agreement between the two sets of vertical metallicity gradients for the thin disc and halo, while they are somewhat different for the thick disc.