In 2008, a study at the Max Planck Institute in Leipzig showed that the subconscious parts of our brains “know” what we will do seven seconds before we consciously make the decision.
The aim of the experiment was to find out what happens in the brain in the period just before the person felt the decision was made. The researchers found that it was possible to predict from brain signals which option participants would take already seven seconds before they consciously made their decision. Normally researchers look at what happens when the decision is made, but not happens several seconds before. The fact that decisions can be predicted so long before they are made is a astonishing finding.
But the researchers warn that the study does not finally rule out free will: "Our study shows that decisions are unconsciously prepared much longer ahead than previously thought. But we do not know yet where the final decision is made. We need to investigate whether a decision prepared by these brain areas can still be reversed."
Sources: https://www.mpg.de/research/unconscious-decisions-in-the-brain
https://www.sciencedaily.com/releases/2008/04/080414145705.htm