Linda Boiler, who studies public mental health at the Trimbos Institute in the Netherlands, who was not involved in the study, likens well-being to a vaccine that protects people when they are in trouble. “Maybe we shouldn’t aim for ‘happy’ all the time,” she said. “It’s more productive to give people the skills and tools to keep their minds healthy and deal with the challenges and problems they encounter.”

Because online courses can reach thousands of people, they can have a large impact on society, even if the impact on individuals is small, Boiler said. “You can still have an impact on public mental health because overall well-being will improve for the population as a whole,” she said. However, she noted that online courses often don’t reach older adults who are prone to isolation, or economically disadvantaged people who may not have the time or money to go to school, or people who don’t have easy access to online platforms.

For those who sign up, there’s also the issue of maintaining momentum. In Hood’s classes, students earn course credit. But in the real world, there is little incentive to get people involved. Low course completion rates are a common problem; some studies show that less than 10% of students who take online courses complete them.

Santos’ Coursera course has more than 3.8 million enrolments to date, but in the paper documenting its effectiveness, she and her colleagues note that thousands of participants could not be included in their results because they did not complete the course , did not complete the survey, or rushed through the class so quickly that the researchers determined they could not complete the assignment correctly.

It is unclear how long the benefits of these courses will last. As with eating healthy or exercising, maintaining good mental health habits can be difficult. Moving on will become easier, Boiler said, as people routineize things like writing down things they’re grateful for. For most participants, however, Hood doubts the gains will slowly wear off. “I do think, for some people, it’s life-changing,” he said. “But in general, I think most people will go back to their baseline.”

Introducing the concepts earlier might help, he suggested, as would including them in continuing education courses needed by professionals such as doctors, pilots and lawyers. Santos is already developing a course for middle school students.

Hood sees himself as one of the adults whose lives have been changed by a happiness class. He admitted that he was initially a skeptic. “When I heard about it, I thought, ‘Oh, come on, you must be kidding me,'” he said. “But it does work.”

Practicing what he taught made Hood feel less competitive. He meditated, something he had never dreamed of before. But, he said, “What convinced me was the data. The fact that we did this every time with a variety of different groups repeatedly showed that it made some sense.”

More great Wired stories