We present an efficient Monte-Carlo method for long-range interacting systems to calculate free energy as a function of an order parameter. In this method, a variant of the Wang--Landau method regarding the order parameter is combined with the stochastic cutoff method, which has recently been developed for long-range interacting systems. This method enables us to calculate free energy in long-range interacting systems with reasonable computational time despite the fact that no approximation is involved. This method is applied to a three-dimensional magnetic dipolar system to measure free energy as a function of magnetization. By using the present method, we can calculate free energy for a large system size of 163 spins despite the presence of long-range magnetic dipolar interactions. We also discuss the merits and demerits of the present method in comparison with the conventional Wang--Landau method in which free energy is calculated from the joint density of states of energy and order parameter.