Erschwil was first mentioned in 1147 as Hergiswilre.
Erschwil has an area, as of 2009, of 7.43 square kilometers (2.87 sq mi). Of this area, 2.58 km2 (1.00 sq mi) or 34.7% is used for agricultural purposes, while 4.3 km2 (1.7 sq mi) or 57.9% is forested. Of the rest of the land, 0.53 km2 (0.20 sq mi) or 7.1% is settled (buildings or roads), 0.02 km2 (4.9 acres) or 0.3% is either rivers or lakes and 0.02 km2 (4.9 acres) or 0.3% is unproductive land.
Of the built up area, housing and buildings make up 3.0% and transportation infrastructure makes up 3.0%. Out of the forested land, 54.9% of the total land area is heavily forested and 3.0% is covered with orchards or small clusters of trees. Of the agricultural land, 2.2% is used for growing crops and 30.1% is pastures, while 1.7% is used for orchards or vine crops. All the water in the municipality is flowing water.
The municipality is located in the Thierstein district. It is an elongated village on both sides of the Lüssel river.
The blazon of the municipality coat of arms is Or a Pick and a Smith's Hammer Sable in Saltire.
Erschwil has a population (as of December 2015) of 903. As of 2008, 5.2% of the population are resident foreign nationals. Over the last 10 years (1999–2009 ) the population has changed at a rate of -1.9%. It has changed at a rate of -1.2% due to migration and at a rate of -0.2% due to births and deaths.
Most of the population (as of 2000) speak German (894 or 96.0%), with French being the second most common (12 or 1.3%) and Serbo-Croatian being third (7 or 0.8%).
As of 2008, the gender distribution of the population was 49.3% male and 50.7% female. The population was made up of 422 Swiss men (45.9% of the population) and 31 (3.4%) non-Swiss men. There were 434 Swiss women (47.2%) and 32 (3.5%) non-Swiss women. Of the population in the municipality 469 or about 50.4% were born in Erschwil and lived there in 2000. There were 188 or 20.2% who were born in the same canton, while 191 or 20.5% were born somewhere else in Switzerland, and 52 or 5.6% were born outside of Switzerland.
In 2008 there were 8 live births to Swiss citizens and 1 birth to non-Swiss citizens, and in same time span there were 15 deaths of Swiss citizens. Ignoring immigration and emigration, the population of Swiss citizens decreased by 7 while the foreign population increased by 1. There were 3 Swiss men and 2 Swiss women who immigrated back to Switzerland. At the same time, there were 4 non-Swiss men and 2 non-Swiss women who immigrated from another country to Switzerland. The total Swiss population change in 2008 (from all sources, including moves across municipal borders) was a decrease of 3 and the non-Swiss population increased by 8 people. This represents a population growth rate of 0.5%.
The age distribution, as of 2000, in Erschwil is; 80 children or 8.6% of the population are between 0 and 6 years old and 166 teenagers or 17.8% are between 7 and 19. Of the adult population, 39 people or 4.2% of the population are between 20 and 24 years old. 279 people or 30.0% are between 25 and 44, and 191 people or 20.5% are between 45 and 64. The senior population distribution is 132 people or 14.2% of the population are between 65 and 79 years old and there are 44 people or 4.7% who are over 80.
As of 2000, there were 379 people who were single and never married in the municipality. There were 484 married individuals, 44 widows or widowers and 24 individuals who are divorced.
As of 2000, there were 341 private households in the municipality, and an average of 2.7 persons per household. There were 52 households that consist of only one person and 28 households with five or more people. Out of a total of 345 households that answered this question, 15.1% were households made up of just one person and there were 8 adults who lived with their parents. Of the rest of the households, there are 120 married couples without children, 138 married couples with children There were 16 single parents with a child or children. There were 7 households that were made up of unrelated people and 4 households that were made up of some sort of institution or another collective housing.
In 2000 there were 244 single family homes (or 81.3% of the total) out of a total of 300 inhabited buildings. There were 27 multi-family buildings (9.0%), along with 21 multi-purpose buildings that were mostly used for housing (7.0%) and 8 other use buildings (commercial or industrial) that also had some housing (2.7%). Of the single family homes 31 were built before 1919, while 41 were built between 1990 and 2000. The greatest number of single family homes (53) were built between 1981 and 1990.
In 2000 there were 352 apartments in the municipality. The most common apartment size was 5 rooms of which there were 115. There were 4 single room apartments and 184 apartments with five or more rooms. Of these apartments, a total of 334 apartments (94.9% of the total) were permanently occupied, while 10 apartments (2.8%) were seasonally occupied and 8 apartments (2.3%) were empty. As of 2009, the construction rate of new housing units was 1.1 new units per 1000 residents. The vacancy rate for the municipality, in 2010, was 0.81%.
The historical population is given in the following chart:
Simon Lutz, author: Book "Erschwil - Leben an der Lüssel"- 768 pages, printed in 2012.
In the 2007 federal election the most popular party was the FDP which received 39.41% of the vote. The next three most popular parties were the CVP (24.23%), the SVP (23.41%) and the SP (6.36%). In the federal election, a total of 391 votes were cast, and the voter turnout was 56.4%.
As of 2010, Erschwil had an unemployment rate of 2.5%. As of 2008, there were 33 people employed in the primary economic sector and about 12 businesses involved in this sector. 224 people were employed in the secondary sector and there were 19 businesses in this sector. 67 people were employed in the tertiary sector, with 24 businesses in this sector. There were 449 residents of the municipality who were employed in some capacity, of which females made up 41.2% of the workforce.
In 2008 the total number of full-time equivalent jobs was 276. The number of jobs in the primary sector was 18, all of which were in agriculture. The number of jobs in the secondary sector was 212 of which 50 or (23.6%) were in manufacturing and 162 (76.4%) were in construction. The number of jobs in the tertiary sector was 46. In the tertiary sector; 15 or 32.6% were in wholesale or retail sales or the repair of motor vehicles, 5 or 10.9% were in the movement and storage of goods, 6 or 13.0% were in a hotel or restaurant, 7 or 15.2% were technical professionals or scientists, 5 or 10.9% were in education.
In 2000, there were 158 workers who commuted into the municipality and 327 workers who commuted away. The municipality is a net exporter of workers, with about 2.1 workers leaving the municipality for every one entering. About 3.2% of the workforce coming into Erschwil are coming from outside Switzerland. Of the working population, 21.8% used public transportation to get to work, and 57.5% used a private car.
From the 2000 census, 723 or 77.7% were Roman Catholic, while 103 or 11.1% belonged to the Swiss Reformed Church. Of the rest of the population, there were 4 members of an Orthodox church (or about 0.43% of the population), there was 1 individual who belongs to the Christian Catholic Church, and there were 3 individuals (or about 0.32% of the population) who belonged to another Christian church. There was 1 individual who was Jewish, and 16 (or about 1.72% of the population) who were Islamic. 55 (or about 5.91% of the population) belonged to no church, are agnostic or atheist, and 25 individuals (or about 2.69% of the population) did not answer the question.
In Erschwil about 348 or (37.4%) of the population have completed non-mandatory upper secondary education, and 62 or (6.7%) have completed additional higher education (either university or a Fachhochschule). Of the 62 who completed tertiary schooling, 69.4% were Swiss men, 29.0% were Swiss women.
During the 2010-2011 school year there were a total of 82 students in the Erschwil school system. The education system in the Canton of Solothurn allows young children to attend two years of non-obligatory Kindergarten. During that school year, there were 23 children in kindergarten. The canton's school system requires students to attend six years of primary school, with some of the children attending smaller, specialized classes. In the municipality there were 59 students in primary school. The secondary school program consists of three lower, obligatory years of schooling, followed by three to five years of optional, advanced schools. All the lower secondary students from Erschwil attend their school in a neighboring municipality.
As of 2000, there were 2 students in Erschwil who came from another municipality, while 48 residents attended schools outside the municipality.