Oberdorf is first mentioned in 1305 as Oberdorf.
Oberdorf has an area, as of 2009, of 11.95 square kilometers (4.61 sq mi). Of this area, 2.96 km2 (1.14 sq mi) or 24.8% is used for agricultural purposes, while 8.1 km2 (3.1 sq mi) or 67.8% is forested. Of the rest of the land, 0.83 km2 (0.32 sq mi) or 6.9% is settled (buildings or roads), 0.02 km2 (4.9 acres) or 0.2% is either rivers or lakes and 0.04 km2 (9.9 acres) or 0.3% is unproductive land.
Of the built up area, housing and buildings made up 3.7% and transportation infrastructure made up 2.0%. Out of the forested land, all of the forested land area is covered with heavy forests. Of the agricultural land, 11.1% is used for growing crops and 7.3% is pastures and 5.8% is used for alpine pastures. All the water in the municipality is flowing water.
The municipality is located in the Lebern district, on a terrace at the southern foot of the Weissenstein of the Jura mountains. Oberdorf lies at 559 meters (1,834 ft), 3.5 km (2.2 mi) to the north-west of Solothurn, the capital of the Canton of Solothurn.
The blazon of the municipal coat of arms is Azure St. Michael Argent with Wings displayed holding in dexter a Sword and in sinister Scales.
Oberdorf has a population (as of December 2015) of 1,654. As of 2008, 5.9% of the population are resident foreign nationals. Over the last 10 years (1999–2009 ) the population has changed at a rate of 5.6%.
Most of the population (as of 2000) speaks German (1,527 or 94.7%), with French being second most common (20 or 1.2%) and Italian being third (13 or 0.8%). There are 2 people who speak Romansh.
As of 2008, the gender distribution of the population was 48.3% male and 51.7% female. The population was made up of 752 Swiss men (44.3% of the population) and 68 (4.0%) non-Swiss men. There were 828 Swiss women (48.8%) and 49 (2.9%) non-Swiss women. Of the population in the municipality 400 or about 24.8% were born in Oberdorf and lived there in 2000. There were 564 or 35.0% who were born in the same canton, while 441 or 27.4% were born somewhere else in Switzerland, and 170 or 10.5% were born outside of Switzerland.
In 2008 there were 13 live births to Swiss citizens and were 6 deaths of Swiss citizens. Ignoring immigration and emigration, the population of Swiss citizens increased by 7 while the foreign population remained the same. There was 1 Swiss man who emigrated from Switzerland and 3 Swiss women who immigrated back to Switzerland. At the same time, there were 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 an increase of 31 and the non-Swiss population increased by 3 people. This represents a population growth rate of 2.1%.
The age distribution, as of 2000, in Oberdorf is; 111 children or 6.9% of the population are between 0 and 6 years old and 272 teenagers or 16.9% are between 7 and 19. Of the adult population, 62 people or 3.8% of the population are between 20 and 24 years old. 476 people or 29.5% are between 25 and 44, and 432 people or 26.8% are between 45 and 64. The senior population distribution is 197 people or 12.2% of the population are between 65 and 79 years old and there are 62 people or 3.8% who are over 80.
As of 2000, there were 595 people who were single and never married in the municipality. There were 861 married individuals, 78 widows or widowers and 78 individuals who are divorced.
As of 2000, there were 621 private households in the municipality, and an average of 2.5 persons per household. There were 128 households that consist of only one person and 42 households with five or more people. Out of a total of 632 households that answered this question, 20.3% were households made up of just one person and there were 7 adults who lived with their parents. Of the rest of the households, there are 230 married couples without children, 225 married couples with children There were 21 single parents with a child or children. There were 10 households that were made up of unrelated people and 11 households that were made up of some sort of institution or another collective housing.
In 2000 there were 357 single-family homes (or 73.0% of the total) out of a total of 489 inhabited buildings. There were 76 multi-family buildings (15.5%), along with 43 multi-purpose buildings that were mostly used for housing (8.8%) and 13 other use buildings (commercial or industrial) that also had some housing (2.7%). Of the single-family homes 24 were built before 1919, while 73 were built between 1990 and 2000. The greatest number of single-family homes (88) were built between 1981 and 1990.
In 2000 there were 681 apartments in the municipality. The most common apartment size was 4 rooms of which there were 187. There were 10 single room apartments and 338 apartments with five or more rooms. Of these apartments, a total of 618 apartments (90.7% of the total) were permanently occupied, while 42 apartments (6.2%) were seasonally occupied and 21 apartments (3.1%) were empty. As of 2009, the construction rate of new housing units was 3 new units per 1000 residents. The vacancy rate for the municipality, in 2010, was 0%.
The historical population is given in the following chart:
The parish and pilgrimage church in Oberdorf is listed as a Swiss heritage site of national significance. The entire village of Oberdorf is part of the Inventory of Swiss Heritage Sites.
In the 2007 federal election the most popular party was the FDP which received 33.69% of the vote. The next three most popular parties were the CVP (20.01%), the SVP (17.46%) and the SP (15.23%). In the federal election, a total of 731 votes were cast, and the voter turnout was 59.7%.
As of 2010, Oberdorf had an unemployment rate of 2%. As of 2008, there were 40 people employed in the primary economic sector and about 14 businesses involved in this sector. 58 people were employed in the secondary sector and there were 10 businesses in this sector. 417 people were employed in the tertiary sector, with 43 businesses in this sector. There were 841 residents of the municipality who were employed in some capacity, of which females made up 43.3% of the workforce.
In 2008 the total number of full-time equivalent jobs was 301. The number of jobs in the primary sector was 32, all of which were in agriculture. The number of jobs in the secondary sector was 49 of which 34 or (69.4%) were in manufacturing and 15 (30.6%) were in construction. The number of jobs in the tertiary sector was 220. In the tertiary sector; 7 or 3.2% were in wholesale or retail sales or the repair of motor vehicles, 16 or 7.3% were in the movement and storage of goods, 42 or 19.1% were in a hotel or restaurant, 19 or 8.6% were in the information industry, 12 or 5.5% were the insurance or financial industry, 5 or 2.3% were technical professionals or scientists, 14 or 6.4% were in education and 59 or 26.8% were in health care.
In 2000, there were 154 workers who commuted into the municipality and 655 workers who commuted away. The municipality is a net exporter of workers, with about 4.3 workers leaving the municipality for every one entering. Of the working population, 24.3% used public transportation to get to work, and 52.6% used a private car.
From the 2000 census, 638 or 39.6% were Roman Catholic, while 587 or 36.4% belonged to the Swiss Reformed Church. Of the rest of the population, there were 11 members of an Orthodox church (or about 0.68% of the population), there were 5 individuals (or about 0.31% of the population) who belonged to the Christian Catholic Church, and there were 39 individuals (or about 2.42% of the population) who belonged to another Christian church. There were 16 (or about 0.99% of the population) who were Islamic. There were 2 individuals who were Buddhist and 1 individual who belonged to another church. 277 (or about 17.18% of the population) belonged to no church, are agnostic or atheist, and 36 individuals (or about 2.23% of the population) did not answer the question.
In Oberdorf about 632 or (39.2%) of the population have completed non-mandatory upper secondary education, and 318 or (19.7%) have completed additional higher education (either university or a Fachhochschule). Of the 318 who completed tertiary schooling, 68.9% were Swiss men, 22.0% were Swiss women, 5.3% were non-Swiss men and 3.8% were non-Swiss women.
During the 2010-2011 school year there were a total of 165 students in the Oberdorf 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 31 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 134 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 Oberdorf attend their school in a neighboring municipality.
As of 2000, there was one student in Oberdorf who came from another municipality, while 146 residents attended schools outside the municipality.