  We present a new tool for the photometric estimate of stellar masses in
distant galaxies. The observed SEDs are fitted by combining single stellar
populations, with different SFRs and amounts of dust extinction. This approach
gives us the best flexibility when dealing with the widest variety of physical
situation for the target galaxies. In particular we tested the code on three
classes of sources: dusty ISO-selected starbursts, K-band selected
ellipticals/S0s and z=2-3 Lyman-break galaxies. We pay particular attention in
evaluating the uncertainties in the stellar mass estimate, due to degeneracies
in the physical parameters, different SFHs or metallicities. Based on
optical-NIR photometric data, the stellar masses are found to have overall
uncertainties of a factor of ~2 for E/S0s, ~2-5 for the starbursts population,
and up to 10 for Ly-break galaxies. In any case the latter appear to correspond
to a galaxy population significantly less massive than those observed at lower
redshifts, possibly indicating substantial stellar build-up at z~1-2 in the
field galaxy population. Using simulated deep SIRTF/IRAC observations of
starbursts and Lyman-break galaxies, we investigate how an extension of the
wavelength dynamic range will decrease the uncertainties in the stellar mass
estimate, and find that they will reduce for both classes to factors of 2-3,
good enough for statistically reliable determinations of the galaxy
evolutionary mass functions.
