An employee from Japanese electronics giant Hitachi shows a wearable sensor aimed at measuring the happiness of workers

It is a problem that has defeated generations of philosophers, poets and painters, but one Japanese company thinks it has come up with a way of knowing for sure if people are happy.

Hitachi High Technologies, a subsidiary of ovens-to-trains conglomerate Hitachi, says its new measuring device will let bosses know if they run a happy office—or if their employees are secretly bored at work.

The company has developed a credit-card size loaded with sensors that determine where the wearer is and whether he or she is sitting, standing, typing or nodding.

It also records who is talking to whom and for how long, among other activities.

The data is then sent back to a base unit, which calculates the happiness of the group as a whole by comparing the patterns of activity with pre-determined patterns from groups who report being... well, happy.

Hitachi says the idea behind the system is to help employers find ways that can increase the group's happiness, thereby improving their productivity.

The system, which cannot be used to measure an individual's state of mind, will go on sale in Japan in April, with each measuring tag costing 100,000 yen ($840) a year.