If your kid’s grades aren’t what they could be, put the brakes on frequent drive-thru meals. A new study has found a link between a diet heavy on burgers, fries and other fast food fare and school success.

Researchers at Ohio State University looked at the diets and test scores of more than 8,500 kids when they were in fifth grade and again when the students hit eighth grade. Twenty percent of the kids in the study ate fast food four to seven times a week. They scored 20 percent lower on reading, math and science tests than the one-third of students who never ate fast food. Kids who had fast food just one to three times a week had poorer scores in only one subject — math.

These findings held even when other factors known to affect school performance were taken into account, such as kids’ socioeconomic status, where they live, how much TV they watch and how active they are, says lead author Kelly Purtell, PhD, assistant professor of human sciences at Ohio State University.

Why does a fast food diet get a big fat F when it comes to test success? “It may be that children who eat large amounts of fast food aren’t getting enough of the nutrients that play a role in learning,” says Purtell.

These include iron, essential fatty acids, potassium, magnesium and zinc. Low levels of these nutrients have been found to impact learning, memory and attention. Other research suggests that the high amounts of calories, fat and sugar in a typical fast food meal can short circuit the hippocampus, the part of the brain where learning and memory take place.

If fast food is a necessary evil in your busy life, don’t let this news trip your parental guilt switch. Nutrition experts understand the time constraints and frenetic schedules of the modern American family. There are ways to make sure your kids eat for better grades without banning fast food altogether.

Have a plan. On Sundays, sit down with your kids and the calendar and together plot out meals for the coming week, suggests Wesley Delbridge, RD, a spokesperson for the Academy of Nutrition and Dietetics. If you know breezing through the drive-thru is the best you’ll be able to manage for dinner before Wednesday night’s science fair/band concert/baseball game, plan to make up for it with more nutritious food at breakfast and lunch. The key is to make this a family decision. “Kids are more likely to eat the food in front of them if they have some say in the planning or cooking,” says Delbridge.

Insist on breakfast. Make sure the first meal of the day is a nutritious one. “Studies show that eating breakfast boosts concentration, memory and attention span,” says registered dietitian nutritionist Heather Mangieri, a spokesperson for the Academy of Nutrition and Dietetics. The ideal breakfast pairs protein with high-quality carbs, she adds. Think low-sugar, high-fiber fortified cereal with milk, hard-boiled eggs and whole-wheat toast or even rice cakes with peanut butter.

Explain the food-brain link. “Help your kids make the connection between what they eat and how well they do in school,” says Mangieri. If your eighth grader reports that he had a tough time on a test, talk about what he ate for breakfast (and lunch if the exam was in the afternoon). For young children, Delbridge suggests giving healthy food nicknames that “reflect their superpower, like X-ray vision carrots.”

Find a balance. You don’t have to cut fast food out of your family’s diet altogether. In fact, that tactic might backfire. Most fast-food restaurants have healthy offerings like fruit and salad, which are both high in potassium and magnesium, and low-fat milk, a good source of protein. “Give your kids choices,” advises Mangieri. “For example, tell them they can order fries as a side but will need to switch out the shake for low-fat milk.”

Denise Foley is a veteran health writer and a former contributing executive editor at Prevention magazine.