With perl:
$ printf '%s\n' 1 2 4 | perl -MList::Util=min,max -MStatistics::Basic=mean,median -w -le ' chomp(@l = <>); print for min(@l), max(@l), mean(@l), median(@l)' 1 4 2.33 2 The precision of the ones from Statistics::Basic can be changed either with the $IPRES environment variable or by setting Statistics::Basic's ipres parameter; also beware the locale's radix character and decimal separators are honoured:
$ printf '%s\n' 1 2 10004 | LC_NUMERIC=fr_FR.UTF-8 perl -C -MList::Util=min,max \ -MStatistics::Basic=mean,median,ipres=6 -le ' chomp(@l = <>); print for min(@l), max(@l), mean(@l), median(@l)' 1 10004 3 335,666667 2