How do you value your child’s education?

If this sounds like a chowder-headed question to ask a group of conscientious parents, it’s worth noting that economists have been parsing this issue for decades. But they’re not in search of feel-good maxims like “My children are priceless, so educating them is of the highest value to me.”

No, we’re talking cold, hard dollars and cents. As any real estate agent worth her smartphone knows, high-performing schools and higher price per square foot seem engaged in an eternal tango. The question that vexes economists is of the chicken-and-egg variety: Do better schools lead to higher home prices or the other way around?

Public school price bump

In many cities such calculations are hard to do without an advanced degree in statistics, but sometimes the value of public schools is starkly evident. Piedmont, Calif., a small, upscale city surrounded by economically diverse Oakland, is known for its top-rated schools. According to a recent scan of the multiple listing service, homes in Piedmont run at least $100K more than an Oakland home of the same size and quality located directly across the street.

In Cupertino, Calif., where virtually all the elementary schools rake in stratospheric scores on standardized tests, the price of run-of-the-mill ranch homes can go for several hundred thousand dollars more than those in nearby communities with mediocre schools. This premium doesn’t deter some parents: One father who moved his family so his children could attend the top-rated Stevens Creek Elementary School in Cupertino told the New Yorker he’d circled the perimeter of the school district on a map and given it to his real estate agent.

When buying into the best goes bad

Jessica Gottleib, a mother and blogger based in Los Angeles, made a similar calculation, but it backfired. “I bought into a ‘good school’ neighborhood,” she says. “By moving just a few blocks away, we could have saved about $200,000.”

Gottleib discovered the problem with long-term bets on a school based on its past performance: You can’t control its future. After she moved her family into the new home, the high-performing neighborhood school — as Gottleib put it — “tanked.” Her children ended up in private schools. Now she cautions other parents to avoid making the same mistake: “I routinely tell moms to save their money and buy the house they love in the neighborhood they love.”

Better homes, better schools

Other parents report happier outcomes after buying into highly acclaimed school districts. Julie Rebboah, a teacher and the author of Magic Letters: The Keys to the World of Words, placed a high priority on finding the right schools for her two children. But when she and her husband ran the numbers, they realized they could neither buy in the San Francisco Bay Area in a good school district nor foot the bill for private school tuition. Instead, they decided to move out of the state — to the high-performing Lake Oswego School District in Oregon. “Our son is flourishing here, and our house payments are lower than in California,” she explains. “For our family, it was the right decision.”

When Kelly Utt-Grubb opted to homeschool her two young children instead of placing them in a local public school in Buford, Ga., a suburb of Atlanta, she realized the search for the right school trumped all else, including homeownership. After carefully researching schools in numerous areas, she and her husband decided on Cary, N.C. They sold their home at a loss, became renters, and never looked back.

“We carefully researched Cary and the educational environment that goes along with living near the Research Triangle Park area of Raleigh-Durham,” Utt-Grubb says. “We also chose the specific elementary school my kids go to (Carpenter Elementary in Cary) and even moved into a rental house that is right behind the school.”

Putting a price on the priceless

For parents searching for both a home and a school at the same time, it’s worth attempting to crunch the numbers and analyze your choices.

Would you spend $50K simply for access to better schools — how about $100K or even $200K? Should you buy, say, a smaller home in a better school district to fend off private school bills? (And will it break the bank if your public school turns out to be a disappointment?) Would you trade in one version of the American dream (buying a home) for another (giving your children a better education than you had and renting a small apartment near a better school)?

Finally, it’s also worth remembering that if this anxious game of calculation and compromise feels stressful, you aren’t alone. Parents across the country are engaged in the same number-crunching madness, balancing the third bedroom against that school with the special science program. In the end, each family makes their choice based on dozens of factors — unique to their situation, values, and finances. The important thing for parents to remember is that when it comes to buying a new home, sometimes the biggest amenities are invisible: your child’s education.