Los Angeles and Orange counties were ranked as the nation’s third-best large region in which to retire, while Riverside and San Bernardino counties finished last, according to an analysis by Bankrate.

The online banking website ranked 50 of the largest metropolitan areas for folks to consider for their retirement years. Bankrate used nine measurements of what it saw as key variables for retirement living. It compiled a grade for each based on how those metro areas comparatively scored on their ability to meet critical retiree needs.

Bankrate scored L.A.-O.C. “great” for weather and things to do; lauded it for “low” crime rates; graded “good” for well-being; “below average” for public transit, size of population 65-plus and health-care; and got knocked for high taxes and cost of living.

The Inland Empire was graded “good” for well-being and weather; admired for “low” crime; scored “below average” for 65-plus crowd and healthcare; and was marked down for “poor” things to do and public transit, plus “high” taxes and “very high” cost of living.

L.A.-O.C. ended up No. 3 behind Pittsburgh and Boston. The Inland Empire was 50th, just ahead of Memphis, Tenn., and Louisville, Ky.