No pain, no gain applies to happiness, too, according to new research published online in the Journal of Happiness Studies. People who work hard at improving a skill or ability, such as mastering a math problem or learning to drive, may experience stress in the moment, but experience greater happiness on a daily basis and longer term, the study suggests.

"No pain, no gain is the rule when it comes to gaining happiness from increasing our competence at something," said Ryan Howell, assistant professor of psychology at San Francisco State University. "People often give up their goals because they are stressful, but we found that there is benefit at the end of the day from learning to do something well. And what's striking is that you don't have to reach your goal to see the benefits to your happiness and well-being."

Contrary to previous research, the study found that people who engage in behaviors that increase competency, for example at work, school or the gym, experience decreased happiness in the moment, lower levels of enjoyment and higher levels of momentary stress. Despite the negative effects felt on an hourly basis, participants reported that these same activities made them feel happy and satisfied when they looked back on their day as a whole. This surprising find suggests that in the process of becoming proficient at something, individuals may need to endure temporary stress to reap the happiness benefits associated with increased competency.

The study examined whether people who spend time on activities that fulfill certain psychological needs, believed to be necessary for growth and well-being, experience greater happiness. In addition to the need to be competent, the study focused on the need to feel connected to others and to be autonomous or self-directed, and it examined how fulfilling these three needs affects a person's happiness moment by moment within a day.

For two days, participants reported how they spent each hour, the enjoyment and stress experienced in that hour, and whether the activity met their need for competency, connectedness to others or autonomy. A second group of participants completed a similar survey, but reported on the day as a whole.

While behaviors that increase competency were associated with decreased happiness in the moment, people who spent time on activities that met the need for autonomy or feeling connected to others experienced increased happiness both an hourly and daily basis. The greatest increase in momentary happiness was experienced by participants who engaged in something that met their need for autonomy -- any behavior that a person feels they have chosen, rather than ought to do, and that helps them further their interests and goals.

The authors suggest that shifting the balance of needs met in a day could help people find ways to cope with short term stress in the workplace. "Our results suggest that you can decrease the momentary stress associated with improving your skill or ability by ensuring you are also meeting the need for autonomy and connectedness, for example performing the activity alongside other people or making sure it is something you have chosen to do and is true to who you are," Howell said.

Relating these momentary gains in happiness to people's long term life satisfaction, the study found that those who are already satisfied with their life in the long term stand to gain most from the momentary happiness that is derived from feeling connected to others and a sense of autonomy.

"Like a wine connoisseur whose experience means they can appreciate a fine wine more than a novice, people who are already satisfied with their life may have learned how to glean the satisfaction of these needs from their daily activities," Howell said.