Producer surplus is the excess of market price over the price at which the producer is willing to sell a unit.
A producer faces an upward sloping supply curve which means that he is willing to sell first unit at say P1, second unit at say P2, third unit at P3 and so on. P3 is greater than P2 which in turn is greater than P1. The price which he actually receives in the market is the equilibrium price P which is determined by the intersection of the relevant supply and demand curves. Producer surplus equals the positive difference between P and P1, P and P2, P and P3.
Akbar is a fruit vendor who sell oranges in streets of Islamabad. Early in the morning he replenishes his stock from the central fruit market. He is willing to sell the first dozen of oranges for 200 rupees, second dozen for 225 rupees, third dozen for 250 rupees, fourth dozen for 275, fifth dozen for 300 rupees, sixth dozen for 325 rupees and so on. Consumers are willing to buy a dozen for 300 rupees only.
Producer surplus equals excess of market price over the price which a producer is willing to supply a product.
Akbar's producer surplus = (300 − 200) + (300 − 225) + (300 − 250) + (300 − 275) + (300 − 300) = 250