The Palo Alto Weekly recently asked residents of a ritzy Silicon Valley city: "How do you define your social class?"

The survey found that more than 80 people living in Palo Alto and earning up to $399,999 a year in income considered themselves part of the middle class.

Residents acknowledged that while they may be rich elsewhere in the US, they still cannot afford to buy homes in the Bay Area.

Some wealthy residents of Silicon Valley may be falling out of touch with how the rest of the US thinks about money.

The Palo Alto Weekly, a community newspaper published in Palo Alto, California, surveyed more than 250 residents in December and January. Among the questions: "How do you define your social class?"

Eighty-one respondents with self-reported incomes from $10,000 to $399,999 said they considered themselves "middle-class," according to the Palo Alto Weekly.

TechCrunch's Kim-Mai Cutler first spotted the survey's findings.

There is no broadly accepted definition of the middle class; it varies by state.

In September, the US Census Bureau released the 2016 American Community Survey, which measures various economic, social, and housing data among US residents.

That survey found that the national median household income rose by 3.2% over the previous year, to $59,039, the highest to date.

According to the Pew Research Center, people whose household income falls between 66% and 200% of the national median household income can call themselves middle-class. By that definition, the US middle class had household incomes from about $39,000 to about $118,000 in 2016.

In Palo Alto, which has a median household income of more than $137,000, a different standard of wealth applies, according to Palo Alto Weekly's Fiona Kelliher.

Many Palo Alto residents say they'd be wealthy elsewhere

Located in the heart of Silicon Valley, Palo Alto is home to Stanford University and several high-profile tech companies including Tesla, Palantir Technologies, Hewlett-Packard, and VMware.

Respondents to the Palo Alto Weekly's survey cited the area's chronic housing crisis and high cost of living as reasons for identifying as middle-class instead of upper-class.

An aerial view of Palo Alto. Sundry Photography/Shutterstock

"In almost any other part of the country we would be wealthy," said one respondent who identified as middle-class. "Here, we are living month to month."

Another said: "Where I'm from, I'd own a house and be in the upper-middle class."

Others said they "never want for healthy food or clean clothing" but struggle to cover basics like child care. One person said both parents worked to support a family of four, while a 73-year-old said, "I don't feel nearly as financially secure as I expected to be at my age."

The median sale price of a home in Palo Alto hit an all-time high of $3 million in December. Homes in the Silicon Valley city typically sell for 110% of the list price, and buyers put down 20% of the sale price for the down payment on average, according to the real-estate site Redfin.

According to the Palo Alto Weekly, 75 survey respondents said they considered themselves "upper-middle-class," with incomes ranging from about $50,000 to $400,000. Only 17 people said they were "lower-middle-class" or "working class," with incomes falling between $35,000 and $349,999. Four people said they were in the "upper class," with more than $400,000 a year, while 89 declined to answer the question or wrote in another reply.

As home prices continue to climb in Silicon Valley and the cost of living rises, some who identify as middle-class residents may be increasingly justified in saying so.