You might not be able to put a price on happiness but trying to achieve it can be expensive, especially depending on where you live.S Money, an Australian-based money exchange service, ranked the most expensive cities to be happy in the U.S. based on data from a 2018 Purdue University study on the relationship between happiness and income to find the price of happiness in every city.The researchers at S Money converted data from the study to compare the actual price of happiness in each city according to the cost of living value.No. 1 most expensive city to be happy in the U.S.: Santa BarbaraSanta Barbara, California is the most expensive U.S. city to be happy. The cost of living in the city is 57% above the national average, according to the Economic Research Institute.The price of happiness in Santa Barbara is $162,721, according to the S Money report.Santa Barbara is also within the Santa Maria-Santa Barbara region, which was named one of the happiest places in the world based on The Blue Zones Index. It ranks the parts of the world where people regularly live longer than average.The city is often described as “The American Riviera” because its climate is similar to areas along the northern Mediterranean Sea coast, according to the Santa Barbara website.Honolulu, Hawaii is the second most expensive city to be happy in the U.S.M Swiet Productions | Getty Images10 most expensive cities to be happy in the U.S.Santa Barbara, Calif.Honolulu, HawaiiNew York, N.Y.San Francisco, Calif.Seattle, Wash.Oakland, Calif.Anchorage, Alas.Sacramento, Calif.Boston, Mass.Irvine, Calif.Honolulu, Hawaii, ranks as the second most expensive city in the U.S. to be happy in. The Hawaii capital, located on the island of Oahu, had an annual price of happiness of $148,943.According to a 2022 WalletHub study, Hawaii was also the happiest state in the U.S. based on several key metrics, including emotional and physical well-being.Honolulu is one of the most visited cities in the U.S., according to the World Atlas, partly because it is home to the historical attraction of Pearl Harbor.New York City is the No. 3 most expensive city to be happy in the U.S.Bamsgirl411 / 500Px | 500Px | Getty ImagesNew York City rounds out the top three with an annual price of happiness at $145,028.It’s no secret that New York City is one of the most expensive cities to live in.Manhattan alone has a cost of living that is 24% more than Honolulu’s, the second-most expensive urban area in the U.S., according to data from The Council for Community and Economic Research’s Cost of Living Index.New York City is considered a global marketplace because of its significant influence on finances, entertainment, and culture. It is home to Wall Street, Times Square, and the Empire State Building.DON’T MISS: Want to be smarter and more successful with your money, work & life? Sign up for our new newsletter!Get CNBC’s free Warren Buffett Guide to Investing, which distills the billionaire’s No. 1 best piece of advice for regular investors, do’s and don’ts, and three key investing principles into a clear and simple guidebook.