Egerkingen is a municipality in the canton of Solothurn in Switzerland. It has a population of about 3000 of which 20% is of foreign nationality as of 2002. The area of Egerkingen is 7 km².