St. Margrethen has an area,, of. Of this area, 28.3% is used for agricultural purposes, while 31.5% is forested. Of the rest of the land, 34.8% is settled and the remainder is non-productive. It is close to Austria and Germany and acts as a border town with Austria. Currently only a normal road links St. Margrethen with Austria. As a result, the town is at times clogged up with traffic before the customs posts. A motorway link has long been projected, to link the pathways to Zurich and Munich. It is also where the A1 motorway becomes the A13 motorway.
Coat of arms
The blazon of the municipal coat of arms is Argent a Grape Azure slipped palewise and leaved Vert.
Demographics
St. Margrethen has a population of. , about 43.2% of the population was made up of foreign nationals. Of the foreign population,, 83 are from Germany, 280 are from Italy, 1,028 are from ex-Yugoslavia, 235 are from Austria, 170 are from Turkey, and 197 are from another country. Over the last 10 years the population has grown at a rate of 0.5%. Most of the population speaks German, with Serbo-Croatian being second most common and Albanian being third. Of the Swiss national languages, 4,289 speak German, 12 people speak French, 175 people speak Italian, and 12 people speak Romansh. The age distribution,, in St. Margrethen is; 612 children or 11.6% of the population are between 0 and 9 years old and 724 teenagers or 13.7% are between 10 and 19. Of the adult population, 661 people or 12.5% of the population are between 20 and 29 years old. 822 people or 15.6% are between 30 and 39, 737 people or 13.9% are between 40 and 49, and 660 people or 12.5% are between 50 and 59. The senior population distribution is 486 people or 9.2% of the population are between 60 and 69 years old, 357 people or 6.8% are between 70 and 79, there are 190 people or 3.6% who are between 80 and 89, and there are 36 people or 0.7% who are between 90 and 99. there were 754 persons who were living alone in a private dwelling. There were 1,141 persons who were part of a couple without children, and 2,872 who were part of a couple with children. There were 326 people who lived in single parent home, while there are 32 persons who were adult children living with one or both parents, 14 persons who lived in a household made up of relatives, 37 who lived household made up of unrelated persons, and 109 who are either institutionalized or live in another type of collective housing. In the 2007 federal election the most popular party was the SVP which received 44.9% of the vote. The next three most popular parties were the CVP, the FDP and the SP. In St. Margrethen about 58.5% of the population have completed either non-mandatory upper secondary education or additional higher education. Out of the total population in St. Margrethen,, the highest education level completed by 1,336 people was Primary, while 1,822 have completed their secondary education, 354 have attended a Tertiary school, and 311 are not in school. The remainder did not answer this question.
Economy
, St. Margrethen had an unemployment rate of 2.79%. , there were 71 people employed in the primary economic sector and about 17 businesses involved in this sector. 1,165 people are employed in the secondary sector and there are 66 businesses in this sector. 2,066 people are employed in the tertiary sector, with 273 businesses in this sector. the average unemployment rate was 6.3%. There were 352 businesses in the municipality of which 73 were involved in the secondary sector of the economy while 263 were involved in the third. there were 1,365 residents who worked in the municipality, while 1,346 residents worked outside St. Margrethen and 2,161 people commuted into the municipality for work.
Religion
From the, 2,138 or 40.5% are Roman Catholic, while 1,406 or 26.6% belonged to the Swiss Reformed Church. Of the rest of the population, there are 4 individuals who belong to the Christian Catholic faith, there are 190 individuals who belong to the Orthodox Church, and there are 74 individuals who belong to another Christian church. There is 1 individual who is Jewish, and 881 who are Islamic. There are 75 individuals who belong to another church, 332 belong to no church, are agnostic or atheist, and 184 individuals did not answer the question.