This city, known for its charming historical neighborhoods, is the most expensive in the U.S. Can you guess what it is?

On average, American households spend the largest share of their annual expenditures on housing. The average family spends $16,887 on housing per year, equating to 33% of the average household's annual expenditures. But how much do those expenses vary from city to city, and which places are the most expensive?

Well, the Bureau of Labor Statistics recently released a report (link opens PDF) detailing Americans' average annual expenditures on housing and related items. And contrary to popular belief, New York City is not the most expensive city to live in. Two U.S. cities have overtaken it. 

A breakdown of housing costs

The BLS took a deep dive into all the costs of housing, rather than simply comparing the cost of rent or average mortgage payments. Their analysis also took into account utilities (electric, water, and natural gas), household furnishings and equipment (textiles, furniture, floor coverings, appliances, and the like), housekeeping supplies, and other household expenses. What they found was that average annual expenditures on housing were far higher in both Washington, D.C., and San Francisco than in New York.

Source: Bureau of Labor Statistics.

The data is current as of 2012, and housing costs in the District of Columbia and San Francisco have risen since then. In D.C., the rise in housing costs is being led by the redevelopment and gentrification of the downtown area, which in turn is being triggered by the high relative number of government and government-related jobs, particularly in the defense contracting sector. Baby boomers are also moving from the suburbs into the city.

In San Francisco, housing costs have always been high, but they're spiking because of a confluence of factors. The continued boom in technology companies in Silicon Valley -- most notably Apple, Google, and Facebook -- means that a growing cadre of high-paid employees want to live in the area. Add in a longtime lack of housing development in the city, and you have a rise in housing prices that has become a contentious issue in the San Francisco Bay area as longtime renters are priced out of the city. TechCrunch's Kim-Mai Cutler provides a great, in-depth piece on San Francisco's housing problem.

The difference in annual housing costs between the two most expensive cities and the national average is a staggering $10,000. Excluding New York City, the difference between the two most expensive cities and other major U.S. metropolitan areas is over $5,000 annually. If you're thinking of moving, it's smart to compare costs carefully before moving to one of the most expensive cities in the U.S.

National differences in housing cost

While the above data is just from major U.S. cities, we have other data from the Bureau of Economic Analysis showing the real value of housing dollars in each state compared with the national average.

You can see that generally, coastal states are more expensive than non-coastal states, as many people enjoy living near the ocean. You can also see that the Northeast on average is more expensive than the rest of the country except for California. These high costs, coupled with better weather and low to no income taxes, are why many retirees move south to Florida, Texas, etc.

If considering moving to a more expensive city, you should be sure the benefits will be worth the extra expense. For instance, while I pay a high cost of living to live in New York City, the quality of life that I get in the city makes it well worth it, in my opinion. While New York state is ranked poorly in terms of the happiest states in the U.S., New York City is ranked in the top quartile by happiness among U.S. cities, according to the Gallup-Healthways Well-Being Index.

The most important thing is to live in a place where you are happy. While the main determinants of happiness are the same for everyone, the specifics vary. Be sure that an increased cost of living comes with an increased quality of life.