In the real world, variables are observed and recorded in finite precision through a rounding or coarsening operation, i.e. a grouping rule. Grouping includes also censoring or splitting data into categories during collection or publication, and so it involves continuous as well as discrete parent distributions. Sheppard's corrections are formulae which improve the computation of moments when data are grouped into classes. Here we give two speed procedures "raw2grp" and "grp2raw" to compute the correction to raw moments in terms of grouped moments (and viceversa) both in the continuous case and in the discrete case and both for univariate and multivariate parent distributions.