The consumer surplus formula is basically the difference between what consumers are willing to pay for a product and what they actually pay, which is usually the market price. To calculate it, you subtract the market price from the maximum price a consumer is willing to pay, then multiply by the number of units purchased. For example, if you're willing to pay $100 for a new phone but it only costs $80, your consumer surplus is $20. If you buy one phone, the total consumer surplus is $20, but if you buy two, it would be $40. This concept helps understand the value consumers get from a product beyond its actual price.