You’re working on a report and the ping of an inbound email pulls you away. Soon, you find yourself checking your social feeds, the weather, and the news. Sound familiar? Research shows that our attention span for digital tasks is only 40 seconds.

For the last decade, my colleagues and I have been studying how information workers—those who work in offices at computers all day—use digital media in the workplace. Using techniques like ethnographic shadowing, biosensors to measure stress, cameras to record face-to-face interactions, experience sampling to capture mood and focus, and the logging computer and phone activity, we can paint a relatively comprehensive picture of how people use digital technology at work.

We have discovered that on average information workers have a very short attention span when working on the computer, with a median duration of focus of just 40 seconds before switching tasks. A typical scenario we see is that one might be working on a report, and then turn to check email, then turn back to the report, then to YouTube, and then on to several other sites before returning back to the report.

We also find that shifting attention rapidly throughout the workday is linked with stress and lower productivity. When attention switches from the task at hand, people have to reorient back to the interrupted task. This usually involves a cost, in terms of time to restore the context of the task, and sometimes in doing redundant work (such as rereading text). On average, people check email 74 times a day and after each of those email checks, returning to another task takes additional time to orient to that task, known as an interruption cost.

Our work shows that people may actually be more vulnerable to distraction at some times over other times. When people experience boredom or are doing rote work, they are more likely to turn to Facebook or to have a face-to-face interaction.

So what can we do to make ourselves less distracted when working on a computer? Disconnecting from the internet or email is not always possible as we need them for work. Here are some recommendations that might help:

  • Taking work breaks and exercise can actually help us be more focused and productive. Studies show that a short walk in nature makes people significantly better at divergent thinking, or idea generation. This is the type of thinking done in meetings when people brainstorm.
  • Ramping up focus from the get-go. Our data also shows that people have particular patterns of attention throughout the workday. Attention focus for most people peaks around mid-morning and mid-afternoon. This means people don’t always come to work focused; they may need time to ramp up. Incorporating morning exercises or quick morning check-ins into the company schedule can warm people up for the workday. This can encourage people to get them on track to be focused and ready for the day.
  • Practicing focus with mindfulness techniques. Mindfulness is a technique that shows promise in improving focus. But because mindfulness can require weeks or months of training to show results, it could be beneficial for a workgroup to engage in mindfulness training together to motivate people to participate and complete the program.
  • Setting clear goals. Creating a list of goals for the day can also reduce distractibility and help keep workers accountable. This accountability can motivate workers to cut distractions and remain on task. Goals can also be finer-grained–write down what you hope to achieve before lunch or before an afternoon break. Having these benchmarks listed can create a sense of urgency that keeps workers on task.

Gloria Mark is a professor at the Donald Bren School of Information and Computer Sciences at UC Irvine.