We calculate numerically universal finite-size-scaling functions for the th
ree-dimensional O(4) and O(2) models. The approach of these functions to th
e infinite-volume scaling functions is studied in detail on the critical an
d pseudocritical lines. For this purpose we determine the pseudocritical li
ne in two different ways. We find that the asymptotic form of the finite-si
ze-scaling functions is already reached at small values of the scaling vari
able. A comparison with QCD lattice data for two flavours of staggered ferm
ions shows a similar finite-size behaviour which is compatible with that of
the spin models. (C) 2001 Elsevier Science B.V. All rights reserved.