The Washington area is home to some of the healthiest counties in Maryland and Virginia, according to a new national study.

Fairfax, Arlington and Loudoun counties rank among the Old Dominion's 10 healthiest counties, while Montgomery County is the second-healthiest place to live in Maryland, behind Howard County, according to a report by the Robert Wood Johnson Foundation, a private health philanthropy, and the University of Wisconsin Population Health Institute.

The report uses national data to rank counties in two categories: health outcomes and health factors. Health outcome rankings are based on mortality and morbidity rates, while health factor rankings are based on characteristics like access to health care, education and physical environment.

How the counties rank
Fairfax County (1)
Arlington County (2)
Loudoun County (3)
Least healthy:
Buchanan County (129)
Emporia City (130)
Petersburg City (131)
Howard County (1)
Montgomery County (2)
Queen Anne's County (3)
Least healthy:
Dorchester County (22)
Allegany County (23)
Baltimore City (24)
Source: 2012 County Health Rankings

In Maryland, Montgomery has trailed only Howard since the study began in 2010. Montgomery is significantly healthier than neighboring Prince George's County, however, which has ranked among the least healthy of the state's 24 counties each year.

This year, Prince George's ranked 15th in health outcomes, marking an improvement over last year's 17th place.

Still, both the obesity and premature death rates (death before the age of 75) in Montgomery County are about two times lower than in Prince George's. Montgomery County Health Director Uma Ahluwalia attributed much of her county's good health to an emphasis on accessible health care.

"We provide health care to about 32,000 uninsured people, adults and children, so we do a lot for health care," she said.

Northern Virginia counties also have held top spots in both categories since the study began. Smoking, obesity and physical inactivity rates are lower among Fairfax, Arlington and Loudoun residents than in many of the state's 95 counties. The counties also boast some of the lowest premature death rates in the state.

Fairfax residents reported the lowest morbidity, or poor health, rates, while Arlington residents are least likely to be obese or inactive, or smoke. The study's vast range of factors proves that a healthy community is complicated, said Glen Barbour, spokesman for Fairfax County's Health Department.

"Is it building more parks? Is it making sure folks in certain parts of a community have access to fresh foods, or is it building new bike paths?" he said. "There are many factors that go into it that we take into account."