  Lattice quantum chromodynamics calculations of multi-baryon systems with
physical quark masses would start a new age of ab initio predictions in nuclear
physics. Performed on a finite grid, such calculations demand extrapolation of
their finite volume numerical results to free-space physical quantities. Such
extraction of the physical information can be carried out fitting effective
field theories (EFTs) directly to the finite-volume results or utilizing the
L\"uscher free-space formula or its generalizations for extrapolating the
lattice data to infinite volume. To understand better the effect of periodic
boundary conditions on the binding energy of few nucleon systems we explore
here light nuclei with physical masses in a finite box and in free space. The
stochastic variational method is used to solve the few-body systems.
Substantial optimizations of the method are introduced to enable efficient
calculations in a periodic box. With the optimized code, we perform accurate
calculations of light nuclei $A \le 4$ within leading order pionless EFT. Using
L\"uscher formula for the two-body system, and its generalization for 3- and
4-body systems, we examine the box effect and explore possible limitations of
these formulas for the considered nuclear systems.
