Finite-size effects arise when a sample of particles is not sufficient to provide a statistically satisfactory description of the bulk environment of a physical system. As a consequence, a reliable estimate of finite-size effects in many-particle systems is key to judge the validity of a theoretical model or the accuracy of a numerical simulation. In this context, we propose the use of a theorem on the free-energy cost for separating a system into smaller independent subsystems [J. Stat. Mech.: Theory Exp. (2017) 083201; Lett. Math. Phys. 112, 97 (2022)] to estimate the relevance of finite-size effects in thermodynamic quantities from computer simulations. The key aspect of this study is that for two-body potentials, as mostly occurring in physics, the method requires only two-body distribution functions and the particle number density. The calculation of the involved physical quantities can be done numerically on a three-dimensional grid. In some cases even analytical estimates are possible and as an example the uniform interacting electron gas in the ground state is considered; we derive an approximating scaling law for the finite-size effects.