From the inside it's not hard to tell if you're stressed. You might feel agitated, notice your shoulders or jaw tense up, get headaches, or even lie awake at night.

But from the outside, it's a little harder to objectively measure stress and, in turn, know how to treat it. But that could soon change.

Scientists have just published a paper reporting the creation of a wearable electronic chip that can analyse how stressed you are by detecting a particular hormone in your sweat.

"Having a reliable, wearable system can help doctors objectively quantify whether a patient is suffering from depression or burnout, for example, and whether their treatment is effective," says senior author and Ecole Polytechnique Fédérale de Lausanne nanotechnology researcher Adrian Ionescu.

"What's more, doctors would have that information in real time. That would mark a major step forward in the understanding of these diseases."

The chip tracks the hormone cortisol – a steroid hormone that we've long known is released by the adrenal glands in response to physiological stress, including physical stresses or low glucose in your blood.

When your body releases cortisol, kicking off those stressed feelings we're all familar with, it can be detected in saliva, sweat, and pee.

"Cortisol can be secreted on impulse—you feel fine and suddenly something happens that puts you under stress, and your body starts producing more of the hormone," says Ionescu.

The patch works by using an extended gate field effect transistor (EG-FET) made from graphene to analyse small amounts of cortisol in our sweat. The transistor uses short fragments of DNA that bind to cortisol, dragging the hormone closer to the sensor.

This might sound like overkill to those lucky enough to avoid persistent stress – after all, we all get stressed from time to time. But when stress levels stay high – also known as chronic stress – it can lead to a variety of issues.

"Disorders such as obesity, metabolic syndrome, type two diabetes, heart diseases, allergy, anxiety, depression, fatigue syndrome, and burnout are often associated with dysfunctions of the stress axes," the team wrote in their paper.

The team hopes that the patch would be able record cortisol levels over a whole day, which will show if the patient has a normal curve of cortisol, or if something is wrong.

"The level of the cortisol has a circadian rhythm in serum throughout the whole day, with the highest level in the morning (~30 min after waking, 0.14–0.69 µM) and the lowest level at night (0.083–0.36 µM). Sustained stress can disrupt this rhythm and results in an abnormal increase of cortisol level," the team wrote.

"Although the short-term activation of the hypothalamic–pituitary–adrenal axis is adaptive and necessary for everyday life, both high and low levels of cortisol, as well as disrupted circadian rhythms, are implicated in physical and psychological disorders."

You can't go out and get one of these stress patches quite yet, but the team is hoping to test the sensor in a hospital trial soon. Watch this space.

The paper has been published in Communications Materials.