This is an archived article and the information in the article may be outdated. Please look at the time stamp on the story to see when it was last updated.

Small towns are often idealized as family-friendly, safe havens of comfortable living. But does the reality live up to the perfect image?

MoneyGeek had researchers analyze FBI crime data of smaller towns and cities where the population is between 30,000 and 100,000. They used the crime data to calculate the cost of crime in each area.

The cost of crime includes impacts to victims, like the loss of stolen property and medical bills, MoneyGeek explained, as well as the cost to the justice system. Violent crimes typically result in a higher cost than nonviolent crimes, MoneyGeek said.

After crunching the numbers, and comparing the list of smaller cities to its data on crime in large cities, researchers found the stereotype to generally be true – with some noteworthy exceptions. Petersburg, Virginia, for example, was the most dangerous small city analyzed. Its per capita cost of crime was a whopping $9,022, according to MoneyGeek.

Federal Way, Washington, which is just outside Tacoma, had a cost of crime per capita the same as New York City. Federal Way’s population is under 100,000, while New York’s is over 8 million.

Compton ranked as the most dangerous small city in California at $3.495 per capita, placing the city among the 50 most dangerous, along with Los Banos.

But that’s enough about the dangerous small towns of America. MoneyGeek also ranked the safest of the spots.

Two California towns, one in Northern and one in Southern California, each made the list of the nation’s top 25 safest. Rancho Santa Margarita had a cost of crime per capita of just $78, making it the 23rd safest, according to the study. Danville, on the eastern edge of the Bay Area was the 25th safest at $84 per capita.

Yorba Linda, Mission Viejo, San Ramon and Los Gatos also scored well for safety relative to other small cities in the survey.

The top-10 safest small towns or cities, ranked by their low cost of crime per capita, are:

  1. Buffalo Grove, Illinois ($22 per capita)
  2. Franklin, Massachusetts ($32 per capita)
  3. Carmel Town, New York ($35 per capita)
  4. Shrewsbury, Massachusetts ($38 per capita)
  5. Bartlett, Illinois ($39 per capita)
  6. Monroe Township, New Jersey ($39 per capita)
  7. Long Beach, New York ($42 per capita)
  8. Orland Park, Illinois ($49 per capita)
  9. Yorktown Town, New York ($53 per capita)
  10. Lexington, Massachusetts ($59 per capita)

The full list, as well as the safest town or city in every state, can be found here.