Rising fourth grader, Kevin Ramirez, 9, works on a self portrait during art class, part of a new summer program for low-income children in Montgomery County, Md. The program was not among those funded and studied by the Wallace Foundation. (Sarah L. Voisin/The Washington Post)

During their long, languid summers, lots of children forget the lessons they learned in school. But the hot empty months pose an especially big academic hurdle for poor children, whose families might not have time or money for camps or enrichment activities.

Now new research suggests that school districts can stave off the so-called summer slide by offering free, voluntary programs that mix reading and math instruction with sailing, arts and crafts and other summer staples. The research also shows, perhaps unsurprisingly, that students have to attend the programs regularly to reap the benefits.

“We would hope that these findings would encourage district leaders and others to consider whether summer programs can help them achieve their broader goals,” said Ann Stone of the Wallace Foundation, which funded the research as part of its $50 million National Summer Learning Project.

The new findings come as many districts have sought to minimize learning loss by shortening summer vacation or moving toward year-round schooling. Maryland Gov. Larry Hogan (R) bucked that trend last week when he issued an executive order prohibiting districts from starting class before Labor Day, a move that sparked backlash from district leaders who said it could cost students academically.

The new study, conducted by the Rand Corp., compared the performance of third-grade students who applied to and enrolled in five district-run summer programs the performance of third-graders who applied to those programs and did not get in.

The participating districts, which received funding from the Wallace Foundation to run their programs, were in Boston, Dallas, Duval County, Fla., Pittsburgh and Rochester, N.Y.

Although each ran its program differently, there were some commonalities. The programs charged no tuition and ran five days a week for at least five weeks, or 25 days; they offered free transportation and meals; they capped class size at 15; and they included at least three hours a day of math and language arts instruction.

Researchers found no long-term academic effects, on average, for all students who signed up. But that analysis included a significant number of children — about 1 in 5 — who enrolled and then never actually attended. Some of those students had left the district altogether by the time summer rolled around; others dropped out for unknown reasons.

An additional portion of students — 29 percent — had low attendance, showing up for 19 or fewer days.

But half of all the students who enrolled showed up and then attended for at least 20 days. And those students saw significant benefits in math: When they went back to school in the fall for fourth grade, their advantage over students who had not been admitted to the summer program was equivalent to about 25 percent of what the average student learns during the course of a year.

The positive effect was persistent. By spring of their fourth-grade year, their advantage had shrunk but was still significant, about 13 percent of a student’s average annual learning gain.

The impact was stronger, and included not just math but also reading, for students who came back to the program for a second summer. Those students’ advantage translated to between 20 and 25 percent of typical academic gains, researchers found.

“I was very heartened to see how well the high-attenders performed,” said Rand researcher Catherine Augustine. She said she and her colleagues are confident that the differences between the two groups are due to the impact of the summer program, because they took into account demographics, prior achievement and other factors that could explain the results.

James Kim, a Harvard professor who studies summer learning, said previous research has evaluated two kinds of summer programs: specialized ones run by nonprofit organizations targeting small groups of children, or large-scale mandatory programs for students in a single district who need help to catch up academically.

The new research asked more generally whether districts can run large-scale, voluntary programs that make a difference for low-income kids. It “fills a major gap in our knowledge base,” said Kim, who was not involved in the project but has received funding from the Wallace Foundation for other work.

The results raise two natural questions for cash-strapped districts: Are the academic benefits worth the considerable cost? And if so, how do you persuade kids to show up?

In Boston, where Mayor Martin J. Walsh (D) has been a vocal advocate for summer learning, city and school officials said the new research is helping to galvanize support for spending on summer programs. But it’s not a burden that the district can shoulder alone.

Boston Public Schools runs its summer program in partnership with the nonprofit Boston After School & Beyond, pairing certified teachers using district curriculums with community organizations that provide a range of enrichment activities.

The district estimates that the program costs about $1,500 per child. Wallace Foundation funding was critical for getting the program off the ground, said Turahn Dorsey, Boston’s chief of education. Now the city is aiming to share the cost, with the school system, nonprofit organizations and philanthropists each picking up about one-third of the bill.

“It’s more sustainable if you have a set of partners to help carry the load,” Dorsey said.

Boston school system officials said that improving attendance in the summer program is among their top priorities.

Chris Smith, executive director of Boston After School & Beyond, said it is key to design programs that are attractive to children — and to help children cultivate strong relationships with other students and staff.

“I think we’re showing that a voluntary model of summer learning can get results,” Smith said. “Not every good policy has to be mandated.”