SAN DIEGO — The joys of raising a child comes with a hefty price tag for those living in some of the nation’s most expensive U.S. metros, including San Diego.

That’s according to a new study by financial technology company SmartAsset, which set out to calculate these costs by analyzing how much food, housing, childcare, healthcare, transportation and other necessities are costing two-parent households.

SmartAsset says the average cost to raise a child in the U.S. is $20,813 annually with some parts of the country, like California, dishing out more than $30,000 a year per child.

While conducting their study, SmartAsset used data from the Massachusetts Institute of Technology’s Living Wage Calculator to compare the living costs of a household with two adults and one child to that of a childless household with two adults. This data reflects spending in 2022.

The survey’s findings show the San Diego-Chula Vista-Carlsbad metro area ranked among the top 15 most expensive areas to raise a child among 381 metro areas across the country. SmartAsset’s analysis shows the annual cost of raising a child in these areas is $28,745.

To break it down further, the survey shows parents with one child spent an average of $12,006 on childcare, $2,111 on food and $7,908 on housing last year.

Here’s a look at the 15 most expensive U.S. metros to raise a child, according to this study:

Rank Metro AreaAnnual Cost of Raising a ChildChildcareFoodHousing
1San Francisco-Oakland-Berkeley, CA$35,647$16,317$2,111$10,499
2Santa Cruz-Watsonville, CA$33,877$12,410$2,111$12,636
3San Jose-Sunnyvale-Santa Clara, CA$33,228$15,785$2,111$8,612
4Barnstable Town, MA$33,184$18,094$2,054$7,572
5Boston-Cambridge-Newton, MA-NH$32,307$17,892$2,054$6,897
6Ann Arbor, MI$31,670$22,154$1,807$2,580
7Trenton-Princeton, NJ$31,314$17,437$2,054$6,492
8Kalamazoo-Portage, MI$30,786$19,853$1,807$3,997
9Napa, CA$30,412$12,869$2,111$8,712
10Santa Rosa-Petaluma, CA$29,544$12,733$2,111$7,980
11Boulder, CO$29,486$14,914$2,111$5,568
12Oxnard-Thousand Oaks-Ventura, CA$29,371$12,008$2,111$8,532
13Los Angeles-Long Beach-Anaheim, CA$29,131$12,530$2,111$7,770
14Detroit-Warren-Dearborn, MI$28,917$17,754$1,807$4,227
15San Diego-Chula Vista-Carlsbad, CA$28,745$12,006$2,111$7,908

SmartAsset offered up some financial advice for parents in the wake of this study: start saving for your child’s education, don’t forget about retirement funds and work with a financial professional to plan for your future.