In a Free Market Goods Flow to Their Highest-Value Uses
If all units of the good are allocated to the highest-valued uses, then consumer surplus is the area between the demand curve and the price up to the quantity supplied.