VOFI - A library to initialize the volume fraction scalar field. The Vofi library has been developed to accurately calculate the volume fraction field demarcated by implicitly-defined fluid interfaces in Cartesian grids with cubic cells. The method enlists a number of algorithms to compute the integration limits and the local height function, that is the integrand of a double Gauss–Legendre integration with a variable number of nodes. Tests in two and three dimensions are presented to demonstrate the accuracy of the method and are provided in the software distribution with C/C++ and FORTRAN interfaces