Palmyra is located at . According to the United States Census Bureau, the city has a total area of, all land.
Transportation
On US 61-24, a divided highway, Palmyra is six miles from I-72. St. Louis is about two hours away by car; Springfield, Illinois a little less. Daily Amtrak trains link nearby Quincy to downtown Chicago. Commuter air service connects Quincy to St. Louis.
As of the census of 2010, there were 3,595 people, 1,425 households, and 963 families living in the city. The population density was. There were 1,557 housing units at an average density of. The racial makeup of the city was 95.1% White, 2.6% African American, 0.1% Native American, 0.3% Asian, 0.1% Pacific Islander, 0.4% from other races, and 1.4% from two or more races. Hispanic or Latino of any race were 1.2% of the population. There were 1,425 households of which 34.9% had children under the age of 18 living with them, 49.5% were married couplesliving together, 13.7% had a female householder with no husband present, 4.4% had a male householder with no wife present, and 32.4% were non-families. 29.3% of all households were made up of individuals and 14.8% had someone living alone who was 65 years of age or older. The average household size was 2.38 and the average family size was 2.91. The median age in the city was 37.7 years. 25.4% of residents were under the age of 18; 6.9% were between the ages of 18 and 24; 26.7% were from 25 to 44; 22.8% were from 45 to 64; and 18.4% were 65 years of age or older. The gender makeup of the city was 47.5% male and 52.5% female.
2000 census
As of the census of 2000, there were 3,467 people, 1,372 households, and 923 families living in the city. The population density was 1,559.9 people per square mile. There were 1,522 housing units at an average density of 684.8 per square mile. The racial makeup of the city was 96.22% White, 2.62% African American, 0.23% Native American, 0.26% Asian, 0.03% from other races, and 0.63% from two or more races. Hispanic or Latino of any race were 0.61% of the population. There were 1,372 households out of which 33.6% had children under the age of 18 living with them, 52.5% were married couples living together, 11.4% had a female householder with no husband present, and 32.7% were non-families. 30.0% of all households were made up of individuals and 16.1% had someone living alone who was 65 years of age or older. The average household size was 2.38 and the average family size was 2.94. In the city, the population was spread out with 24.8% under the age of 18, 8.9% from 18 to 24, 25.6% from 25 to 44, 20.7% from 45 to 64, and 20.0% who were 65 years of age or older. The median age was 38 years. For every 100 females, there were 88.2 males. For every 100 females age 18 and over, there were 84.3 males. The median income for a household in the city was $31,284, and the median income for a family was $42,946. Males had a median income of $30,829 versus $19,631 for females. The per capita income for the city was $15,625. About 5.5% of families and 8.1% of the population were below the poverty line, including 7.3% of those under the age of 18 and 10.5% of those 65 and older.