In physics, an entropic force acting in a system is a force resulting from the entire system's thermodynamical tendency to increase its entropy, rather than from a particular underlying microscopic force.
For instance, the internal energy of an ideal gas depends only on its temperature, and not on the volume of its containing box, so it is not an energy effect that tends to increase the volume of the box as gas pressure does. This implies that the pressure of an ideal gas has an entropic origin.
What is the origin of such an entropic force? The most general answer is that the effect of thermal fluctuations tends to bring a thermodynamic system toward a macroscopic state that corresponds to a maximum in the number of microscopic states (or micro-states) that are compatible with this macroscopic state. In other words, thermal fluctuations tend to bring a system toward its macroscopic state of maximum entropy.
In the canonical ensemble, the entropic force associated to a macrostate partition is given by: