Low-cost online courses could allow a more-diverse group of students to try college, but a new study suggests that such courses could also widen achievement gaps among students in different demographic groups.

The study, which is described in a working paper titled “Adaptability to Online Learning: Differences Across Types of Students and Academic Subject Areas,” was conducted by Columbia University’s Community College Research Center. The researchers examined 500,000 courses taken by more than 40,000 community- and technical-college students in Washington State. They found that students in demographic groups whose members typically struggle in traditional classrooms are finding their troubles exacerbated in online courses.

The study found that all students who take more online courses, no matter the demographic, are less likely to attain a degree. However, some groups—including black students, male students, younger students, and students with lower grade-point averages—are particularly susceptible to this pattern.

Shanna Smith Jaggars, who is assistant director of the Community College Research Center and one of the paper’s authors, said the widening gap is troubling, as it could imply that online learning is weakening—not strengthening—education equality.

“We found that the gap is stronger in the underrepresented and underprepared students,” Ms. Jaggars said. “They’re falling farther behind than if they were taking face-to-face courses.”

Online learning can still be a great tool, she said, particularly for older students who juggle studying and raising a family. For those students, as well as female and higher-performing students, the difference between online and physical classrooms was more marginal, according to the study.

“So for older students, you can sort of see the cost-benefit balance in favor of taking more courses online,” Ms. Jaggars said. “They might do a little worse, but over all it’s a pretty good trade-off for the easier access. But where a student doesn’t need online courses for their access, it’s unclear if that is a good trade-off.”

Kathy B. Enger, director of the Northern Lights Library Network and an online educator for a decade, said online learning isn’t just about access. It can also offer an environment that encourages minority students to more easily speak up without worrying about “microaggression,” such as a snicker or a rolling of the eyes, from a predominantly white classroom, Ms. Enger said. “There’s more freedom for students to express themselves and feel validated in an online environment,” she added.

The study suggested several ways to improve online courses, including screening students first and allowing only higher-performing students to take courses online. Ms. Jaggars admitted, however, that such a strategy could put some students at a disadvantage, especially older students who enroll in the courses specifically for easier access and who do fairly well in them.

“But then we have to figure out how to help other students succeed in these classes,” she said. “We need a lot more teacher training, showing them tactics to use to try and reach out. I think it’s difficult for faculty to know how to do that online. Not that they don’t want to. It’s just hard.”

Ms. Enger said that if students are falling behind in online courses, it’s generally because the professor teaching the course is not reaching out in the right ways.

“If it’s not working, find out what’s not working,” she said. “Then make it work.”