Where can a tech worker maximize their salary? Tech hubs including the San Francisco Bay Area, Seattle, and Boston topped the list of cities with the highest average salary for tech employees, according to a recent study from Paysa. However, these cities do not always offer the best value in terms of balancing earnings with cost of living, the study found.

“We weren’t surprised to see that where the average tech salary is highest, the cost of living also tends on the high side,” said Chris Bolte, CEO of Paysa, in a press release. “What jumped out at us, however, is that even though you can earn more in the San Francisco Bay Area than other places, with such a high cost-of-living, it’s extremely difficult to get by on a 6+ figure salary. So, it makes sense that companies and employees are looking beyond Silicon Valley and taking advantage of new campuses in different cities across the U.S.”

Pittsburgh, Indianapolis, Charlotte, Atlanta, and Raleigh were the cities with the lowest cost of living for tech employees, while four out of the 10 worst value cites were in California, according to the Paysa research.

Here are the top 10 tech hubs with the highest earning potential, and the average salary for tech workers.

SEE: The 10 best tech jobs that pay the highest salaries

1. San Francisco Bay Area

Average tech salary: $144,390

2. Seattle, WA

Average tech salary: $139,299

3. Boston, MA

Average tech salary: $116,039

4. Denver, CO

Average tech salary: $111,551

5. New York, NY

Average tech salary: $105,925

6. Atlanta, GA

Average tech salary: $105,091

7. Austin, TX

Average tech salary: $103,049

8. Los Angeles, CA

Average tech salary: $100,108

9. Miami, FL

Average tech salary: $99,029

10. Philadelphia, PA

Average tech salary: $96,294

SEE: Half of the 15 highest paying jobs for recent grads are in tech

While San Francisco ranks No. 1 for highest tech salary, it falls to No. 20 in terms of overall value, Paysa found. Cost of living reaches nearly $90,000 per year, with the average monthly rent for a three-bedroom apartment in the city center reaching nearly $6,600.

Meanwhile, the top cities with the best overall value–offering the highest earning potential and the lowest cost of living–include Seattle, Atlanta, Austin, Denver, and Philadelphia.

“It can make a world of difference to look at what you are worth in a certain market based on your skills, education and experience and what your cost of living and the lifestyle that comes with it actually is,” Bolte said in the press release.