The happiness index, created by Bank of Scotland and YouGov, found that the longer a person had to commute to work, the unhappier they felt.
The survey of 3,056 adults asked them to rate their happiness from a high of 100 to a low of -100.
While people who worked from home scored 55.17, those who commuted for more than an hour scored just 29.58.
Among commuters, people who walked to work were happiest, scoring 43.16, while those who took the bus rated their happiness lowest at 34.62.
Part-time workers were found to be happier than those in full-time posts, with scores of 43.28 and 39.29 respectively.
The happiest workers of all were Scots who worked between eight and 29 hours a week in the Highlands and Islands. They scored 61.62. By contrast, part-time workers in Central fared the worst at just 27.83.
People who were unemployed rated their happiness at 16.92.
However, jobless Scots were found to be more content than those working in the legal sector, who scored an unhappy 16.63.
Overall, workers in Scotland were found to be happier than last year.
People employed in the arts, entertainment and recreation were found to be most content, with a happiness score of 57.92.
People working in hotels and lodgings came second at 45.81 and people in personal care rated their working happiness at 45.69.
Graham Blair, from Bank of Scotland, said: "Scotland's workforce is getting happier and it is clear that arrangements that allow people to work more flexibly are making a real difference.
"Those who work from home will be saving time and money on commuting costs while part-time working is a great option for busy families that have young children or other commitments."
People who work from home are the happiest workers in Scotland, a new survey has suggested.