Surface force apparatus (SFA) and atomic force microscopy (AFM) can measure a force curve between a substrate and a probe in liquid. However, the force curve had not been transformed to the number density distribution of solvent molecules (colloidal particles) on the substance due to the absence of such a transform theory. Recently, we proposed and developed the transform theories for SFA and AFM. In these theories, the force curve is transformed to the pressure between two flat walls. Next, the pressure is transformed to number density distribution of solvent molecules (colloidal particles). However, pair potential between the solvent molecule (colloidal particle) and the wall is needed as the input of the calculation and Kirkwood superposition approximation is used in the previous theories. In this letter, we propose a new theory that does not use both the pair potential and the approximation. Instead, it makes use of a structure factor between solvent molecules (colloidal particles) which can be obtained by X-ray or neutron scattering.