  Context: Deep photometric surveys for substellar objects in young clusters
and for high-redshift quasars are affected by contaminant sources at different
heliocentric distances.If not correctly taken into account, the contamination
may have a strong effect on the Initial Mass Function determination and on the
identification of quasars. Aims: We calculate in detail the back- and
foreground contamination by field dwarfs of very late spectral types
(intermediate and late M, L and T) in deep surveys and provide the data and
tools for the computation. Methods: Up-to-date models and data from the
literature have been used: (i) a model of the Galactic thin disc by an
exponential law; (ii) the length and height scales for late-type dwarfs; (iii)
the local spatial densities, absolute magnitudes and colours of dwarfs for each
spectral type. Results: We derive a simplified expression for the spatial
density in the thin disc that depends on the heliocentric distance and the
galactic coordinates (l, b) and integrate it in the truncated cone screened in
the survey. As a practical application, we compute the numbers of L- and T-type
field dwarfs in very deep (I = 21-29 mag) surveys in the direction of the young
sigma Orionis cluster. The increasing number of contaminants at the faintest
magnitudes could inhibit the study of the opacity mass limit at M <~ 0.003
M_sol in the cluster.
