Scientists have developed a free app that tells you the ideal time to take a coffee break to keep you in the "optimal mental alertness zone".

The free Caffeine Zone iOS app, developed at Penn State University, is designed to help people determine when an extra jolt of caffeine may give them a mental boost and when it could harm sleeping patterns.

Coffee time Credit:Quentin Jones

Users enter information about their caffeine consumption - how much caffeine they drank or plan to drink, when they consumed it and how fast - and the app combines this with data on the known effects of caffeine on the body to create a graph showing how caffeine will affect their system over time.

The green bar represents the optimal caffeine zone while the blue bar is where you'll need to get to before bed.