Want to live near your state's top schools? Prepare to pay $300,000 more for your house.

The high cost of education begins long before kids start college, a new study shows.

When parents look for a home to set down roots, they often seek the best public school districts. Those homes tend to cost more, nearly $300,000 more on average, according to children’s equipment manufacturer Chicco which analyzed Zillow home values with Niche’s rankings of best school districts across the U.S.

The average U.S. home value is $353,748 while the average for the best district in every state is 86% higher at $651,662, the study said.

It’s interesting “how strong the correlation between home values and school ratings is across the country,” said Kyle Beierlein, who works as a research assistant with digital marketing firm GoFish on behalf of Chicco. “The significant increase is found from coast to coast.”

Which states have the highest premiums to live near their top school?

The top five states with the steepest premium to live in their top school district, according to Chicco, are:

  • Texas: You’ll have to pay 486% more to dwell in the Eanes Independent School District in Austin. The average Texas home fetches around $293,824, but homes in the Eanes District on average are $1,721,835.

  • Missouri: Ladue School District in St. Louis commands a 346% increase from the state average of $234,834 – to $1,047,091.

  • Connecticut: Westport School District homes go for about $1,630,823, 332% more than the state average of $377,247.

  • California: Palo Alto Unified School District gets a 308% premium. The state’s overall average home value is $743,435, but buying into that coveted school district might cost you $3,030,407.

  • Ohio: Parents must pay a 198% premium to access the Indian Hill Exempted Village School District in Cincinnati. An average Ohio home is valued at $213,149, but buyers looking to live near the top school district will pay about $635,473.

Which commands a higher premium – elementary or high schools?

Homes near the top-rated elementary schools cost 65% more than a state’s average home, while homes near the top-rated high schools cost about 45% more.

“So, on average, it costs a bit more to live near a given state’s top-rated elementary school than it does its top-rated high school,” Beierlein said.

Elite schools: Here are Florida’s Top 10 elementary & middle schools, ranked by U.S. News & World Report

What states have the highest premiums for their best elementary school?

The states where you pay the biggest premium to live near the best elementary school, the study said, are:

  • Connecticut: To live near the state's premier elementary school in New Canaan, you’ll pay 359% more for your home. The state average hovers around $377,247, but those who want their kids near the best school in the state must prepare to pay closer to $1,352,580.

  • Massachusetts: While homes in the states cost $585,959, on average, that skyrockets to $2,033,172 (the highest in the study) when you get near the top-rated elementary school in Weston. That’s a 247% premium.

  • Tennessee: The average home is valued at around $305,570, but those in Brentwood, near the state’s top elementary school, are 245% higher at $1,054,248.