People spend 46.9 percent of their waking hours thinking about something other than what they’re doing, and this mind-wandering typically makes them unhappy. So says a study that used an iPhone Web app to gather 250,000 data points on subjects’ thoughts, feelings, and actions as they went about their lives.

The research, by psychologists Matthew A. Killingsworth and Daniel T. Gilbert of Harvard University, is described this week in the journal Science.

“A human mind is a wandering mind, and a wandering mind is an unhappy mind,” Killingsworth and Gilbert write. “The ability to think about what is not happening is a cognitive achievement that comes at an emotional cost.”

Unlike other animals, humans spend a lot of time thinking about what isn’t going on around them: contemplating events that happened in the past, might happen in the future, or may never happen at all. Indeed, mind-wandering appears to be the human brain’s default mode of operation.

To track this behavior, Killingsworth developed an iPhone app that contacted 2,250 volunteers at random intervals to ask how happy they were, what they were currently doing, and whether they were thinking about their current activity or about something else that was pleasant, neutral, or unpleasant.

Subjects could choose from 22 general activities, such as walking, eating, shopping, and watching television. On average, respondents reported that their minds were wandering 46.9 percent of time, and no less than 30 percent of the time during every activity except making love.

“Mind-wandering appears ubiquitous across all activities,” says Killingsworth, a doctoral student in psychology at Harvard. “This study shows that our mental lives are pervaded, to a remarkable degree, by the nonpresent.”

Killingsworth and Gilbert, a professor of psychology at Harvard, found that people were happiest when making love, exercising, or engaging in conversation. They were least happy when resting, working, or using a home computer.

“Mind-wandering is an excellent predictor of people’s happiness,” Killingsworth says. “In fact, how often our minds leave the present and where they tend to go is a better predictor of our happiness than the activities in which we are engaged.”

The researchers estimated that only 4.6 percent of a person’s happiness in a given moment was attributable to the specific activity he or she was doing, whereas a person’s mind-wandering status accounted for about 10.8 percent of his or her happiness.

Time-lag analyses conducted by the researchers suggested that their subjects’ mind-wandering was generally the cause, not the consequence, of their unhappiness.

“Many philosophical and religious traditions teach that happiness is to be found by living in the moment, and practitioners are trained to resist mind wandering and to ‘be here now,’” Killingsworth and Gilbert note in Science. “These traditions suggest that a wandering mind is an unhappy mind.”

This new research, the authors say, suggests that these traditions are right.

Killingsworth and Gilbert’s 2,250 subjects in this study ranged in age from 18 to 88, representing a wide range of socioeconomic backgrounds and occupations. Seventy-four percent of study participants were American.

More than 5,000 people are now using the iPhone Web app.