There’s no surer recipe for financial failure than racking up expenses that are far beyond the limits of your income. And yet it’s never been easier to live beyond your means, especially as Americans generate billions of dollars of credit card debt each year and the soaring costs of housing and education drive millions into student loan and mortgage debt.

The researchers at LendingTree decided to find out where in the U.S. people are the best at living within their means — and where people can’t help but stretch their pocketbook to the breaking point.

In a recent study, researchers combined anonymized credit data from My LendingTree users with the latest U.S. Census Bureau data on average household income to rank the top 50 metropolitan areas based on how successfully residents are spending within their means.

They looked at the average number of credit inquiries, the use of revolving credit, non-housing debt balances as a percentage of income and mortgage balances (also as a percentage of income). Then they combined these factors to create a “Spending Within Your Means Score” of 0 to 100, with higher scores being assigned to those places where residents are more likely to be living within their means.

The 3 best cities for living within your means

1. Greenville, S.C.

Greenville residents have the lowest use of revolving credit lines among the cities studied (27.6 percent versus the 50 metro average of 29.8 percent). They also had fairly low housing debt balances (62 percent of income versus the 79 percent average of the 50 metros).

What’s more, they aren’t racking up too much non-housing debt. Non-housing balances were near the national average at 47.3 percent. The average Greenville resident has $21,199 in installment loan balances (including auto, student and personal loans), among the lowest of the 50 metros.

2. Greensboro, N.C.

Not so far from Greenville, Greensboro residents have a very similar habit of living within their means.

Greensboro households have roughly the same income on average ($64,797 per year to Greenville residents’ $65,602), and both cities have residents with relatively few credit inquiries — less than four on average in the last two years, LendingTree found.

But their biggest difference lies in how much credit card spending is going on.

Greensboro residents have a higher revolving credit utilization rate compared with Greenville — 28.9 percent versus 27.6 percent. Furthermore, housing debt balances are 64 percent for Greensboro residents versus 62 percent for those in Greenville.

3. Kansas City, Mo.

Kansas City have lower balances of both housing and non-housing debt versus their income than the 50-metro average. It helps that the city’s average incomes are higher than in Greenville and Greensboro, at $79,986 per household.

3 cities where residents are spending beyond their means

50. San Antonio, Texas

At the bottom of the 50 cities analyzed is San Antonio. The city’s residents not only have a greater number of credit inquiries, they also have relatively high rates of revolving credit balances.

Non-housing debt balances represent 55 percent of their annual income, the highest of the 50 metros analyzed. That’s one of the biggest reasons they landed at the bottom of the rankings.

San Antonio residents also have an average balance of $30,599 in installment loans, the highest of the metros analyzed and 26 percent above the average.

49. Las Vegas

Las Vegas residents are gambling with their finances, according to the study’s findings. They scored in the bottom 20 for non-housing debt balances (50.6 percent of income), mortgage balance burdens (97 percent of income), and utilization of revolving credit lines.

48. Phoenix

Phoenix residents are being hurt by the high amount of mortgage debt they carry, according to the analysis. On average, their mortgage balances are 103 percent of their household income, which puts them well above the 50-metro average of 79 percent. Where Phoenix residents stretch further than even mortgage-burdened Western peers is in non-housing debt, with balances accounting for nearly 50 percent of household income of $80,235, LendingTree found.

MagnifyMoney is a price comparison and financial education website, founded by former bankers who use their knowledge of how the system works to help you save money.