Music makes you feel better as you get older, according to new research from Queen's University in Belfast (QUB).
However, its positive effect is enhanced if you have chosen what to listen to yourself, the study suggests.
Previous academic research has shown that listening to music helps to lower stress levels.
The QUB study, however, examined for the first time how your age can affect how much music improves your mood.
Dr Jenny Groarke, from QUB's school of psychology, led the research.
It involved 40 adults, aged between 18 and 30, and another 40 adults, aged between 60 and 81.
Before taking part in the experiment, each of the 80 participants sent the researchers a list of songs they would listen to in order to reduce stress.
To induce stress when they arrived at the QUB laboratory, each participant was given five minutes to prepare a speech and then given a maths test.
'Improve with age'
They were asked to count backwards from 2023 in multiples of 17, having to start again each time they made an error.
To relax after the stressful tasks, half of the participants then listened to the music they had chosen, while half had to listen to a radio documentary on the scientist Charles Darwin.
Classical music was the most popular choice among the older participants while pop and indie were most popular among the younger participants.
A number of older people also chose pop, country and traditional Irish music.
Folk, rock, and electronic or ambient music were other popular choices among the younger participants.
The older people in the study who listened to their own music reported significantly more reduction of stress than either the group who listened to the radio documentary or the younger participants overall.
Dr Groarke said the study supported the idea that listening to music could help people cope with stress, sadness or upset.
"The results indicate that personal music listening can support stress management for both younger and older adults," she said.
"However, the fact that older adults showed greater stress reduction when listening to self-chosen music and when listening to a radio documentary also supports existing theory that emotion regulation abilities develop over time and improve with age.
"This shows that as people get older their ability to reduce their negative feelings, and prolong their positive feelings improves."
The study has been published in the open-access science journal Plos One.