Are you reading this when you should be working? If so, then it may be because your brain signaled that continuing to work was not worth the cost in tedium of forcing yourself to stay on task.

New research published in the Proceedings of the National Academy of Sciences offers insight into how people decide when to keep going and when to take a break. That decision apparently hinges on a specific signal that at its peak— say, when your muscles are screaming that you can’t do another rep or your brain refuses to focus on the page — prompts you to quit. And when your body and brain are refreshed and ready to go again, the signal quiets down and gets out of your way.

The peaks and valleys that trigger these decisions, however, are not pre-set: they’re influenced by how much effort you’re expending and how big a reward you expect from the work. The bigger the reward and the smaller the effort required, the more likely you are to keep going until you’ve done what needs doing. As you work, it seems, your brain continuously calibrates your breaking point in relation to your expectations of gain.

To understand this signaling, researchers led by Mathias Pessiglione of the Motivation Brain and Behavior Laboratory of INSERM in Paris, France, studied 39 people using two brain imaging techniques—fMRI, which maps blood flow to particular brain regions as participants perform certain tasks, and MEG, which uses magnetic fields to follow the brain’s electrical signaling. They were tested while squeezing a handgrip at maximum effort to earn varying monetary rewards. The handgrip was calibrated to each person’s strength and the intensity of effort was displayed on a computer screen as a thermometer— participants had to keep the fluid level in the thermometer over a certain point in order to win the money.

While the volunteers were warned that the amount of effort required might vary during the test, they did not know when it would change. They were shown on the screen how much money was at stake in each 30 second trial— 10, 20 or 50 cents in Euros— and instructed to try to win as much as possible.

During the challenge, both types of brain scans showed activity in a region involved in pain perception, known as the posterior insula. The signal there became more intense when greater effort was required— but less strong when the same level of effort was connected with a bigger potential reward. Bigger rewards also led to a muted signal during rest periods between the tests, meaning people would both expend more effort and require less rest when more was at stake.

The authors write, “[This] process might implement the intuitive psychological phenomenon that, when motivated, we literally push back our limits,” allowing us to worker harder for longer. The study did not ask participants about whether they actually felt less pain or fatigue when expecting bigger rewards, although other research suggests that this change in perception may drive the way the signal affects behavior.

For example, research on pain perception shows that placebos and medications can both relieve pain by changing signaling in this region— and other studies suggest that situational factors like music, stress or the presence of an attractive potential mate also affect how much pain is seen as tolerable.

“[T]he brain can indeed adjust the sensitivity of these regions depending on expectations,” the authors conclude. To push yourself through the pain, it seems, it helps to expect great gain.