To really learn, you must fail exactly this much of the time

“Fail fast” is a popular saying in Silicon Valley. Work hard on your idea and test it out, but also be ready to cut your losses and move on to the next one – which might be a huge success.

New research from the University of Arizona discovered something similar about the link between learning and failure. To begin with, it’s already known that you’re not learning if you’re succeeding 100% of the time – that means the task is too easy. A little bit of failure means that something is just hard enough. (If you’re always failing, you may be in over your head).

Researchers found a precise answer to the link between learning and failure: the most favorable spot for learning something new is when you’re failing about 15% of the time.

Or in other words, you’re getting it right 85% of the time.

“These ideas that were out there in the education field – that there is this ‘zone of proximal difficulty,’ in which you ought to be maximizing your learning – we’ve put that on a mathematical footing,” said UArizona assistant professor of psychology and cognitive science Robert Wilson, in a release. Wilson was the lead author of the study, titled “The Eighty Five Percent Rule for Optimal Learning.”

And while 85% is a solid B average, Wilson is a proponent of students taking difficult classes at school.

“If you are taking classes that are too easy and acing them all the time, then you probably aren’t getting as much out of a class as someone who’s struggling but managing to keep up,” he said. “The hope is we can expand this work and start to talk about more complicated forms of learning.”

The study was published in the journal Nature Communications.