Here's a surprise: Residents of the most expensive coastal U.S. cities seem to be spending within their means. At least a dozen of their southern counterparts are not.

Both New York City and San Francisco residents fell within the top 10 for healthy balance sheets, a new study found

Out of 50 U.S. cities, Greenville, South Carolina, residents were the best for spending within their means, while San Antonio, Texas citizens spent the most, according to a recent LendingTree study.

"You don't need a high income to spend within your means in the U.S. Greenville is an example."-Brian Karimzad, vice president, LendingTree

LendingTree analyzed more than one million U.S. residents' credit inquiries, revolving credit use and debt balances as well as government data on household income.

With so many Americans living paycheck to paycheck, the study focused on four signs of unhealthy spending: "stretching too far" for housing or long-term loans, maxing out credit cards, or constantly seeking new credit options, according to LendingTree vice president of research Brian Karimzad.

On the other hand, Americans who are considered to be spending within their means have debt balances that fall below national averages. For example, those residents are using less than the credit line average among the cities studied. They also have non-housing debt near the national average.

Cities where residents are spending within their means:

1. Greenville, South Carolina

2. Greensboro, North Carolina

3. Kansas City, Missouri

4. Buffalo, New York

5. Charlotte, North Carolina

6. Milwaukee, Wisconsin

7. San Francisco, California

8. Boston, Massachusetts

9. New York, New York

10. Raleigh, North Carolina

Residents of the Carolinas could be a model for spending within your means, as four cities ranked within the study's top 10. Besides Greenville, which had the second-lowest average income of the cities ranked, they include North Carolina's Greensboro, Charlotte and Raleigh. New York and San Francisco, despite their notoriously high costs of living, also ranked within the top 10.

"You don't need a high income to spend within your means in the U.S.," Karimzad said. "Greenville is an example."

As for San Antonio, whose average income is less than $76,000 a year, residents are using significant amounts of credit, especially on cars or trucks because public transportation is limited.

f11photo | Getty Images

Riverwalk in San Antonio, Texas.

"Where San Antonio tips the scale is on those longer term loans that aren't for a house: car and student loans," Karimzad said. "It's a car city."

Many residents of Las Vegas, with $70,401 average income, and Phoenix, Arizona, with $80,235 average income, are still recovering from the housing crisis, Karimzad said.

California had a scattered record for residents' spending habits. San Francisco, with its high-paying jobs and proximity to Silicon Valley, was a top-performer. But residents of San Diego, Los Angeles and Sacramento, respectively, ranked among the 15 cities spending outside their means.

"People do have to stretch for housing in the Bay Area," Karimzad said. "People are definitely making sacrifices in the Bay Area, by not stretching too far on a car or on a loan for vacation."

He added: "It is a very educated place. You have some top universities that produce a lot of talent, and that brings a lot of high paying jobs in the area."