Suppose your child is about to enter the fourth grade and has been assigned to an excellent teacher. Then the teacher decides to quit. What should you do?

The correct answer? Panic!

Well, not exactly. But a landmark new research paper underscores that the difference between a strong teacher and a weak teacher lasts a lifetime. Having a good fourth-grade teacher makes a student 1.25 percent more likely to go to college, the research suggests, and 1.25 percent less likely to get pregnant as a teenager. Each of the students will go on as an adult to earn, on average, $25,000 more over a lifetime — or about $700,000 in gains for an average size class — all attributable to that ace teacher back in the fourth grade. That’s right: A great teacher is worth hundreds of thousands of dollars to each year’s students, just in the extra income they will earn.

The study, by economists at Harvard and Columbia universities, finds that if a great teacher is leaving, parents should hold bake sales or pass the hat around in hopes of collectively offering the teacher as much as a $100,000 bonus to stay for an extra year. Sure, that’s implausible — but their children would gain a benefit that far exceeds even that sum.

Conversely, a very poor teacher has the same effect as a pupil missing 40 percent of the school year. We don’t allow that kind of truancy, so it’s not clear why we should put up with such poor teaching. In fact, the study shows that parents should pay a bad teacher $100,000 to retire (assuming the replacement is of average quality) because a weak teacher holds children back so much.