A new study suggests we've got more time than we thought to master something new – at least as far as learning a new language goes.

Children can pick up languages much more easily than adults, as any kid from a bilingual home will show; but when does this window of opportunity shut? At what age can we no longer absorb enough to reach fluent speaker status?

The new analysis suggests that we remain very skilled at learning the grammar of a new language up until the age of 17 or 18, which was older than expected, according to the team of researchers.

However, if you want to be as proficient as a native speaker, you do need to start much younger.

"If you want to have native-like knowledge of English grammar you should start by about 10 years old," says one of the team, psychologist Joshua Hartshorne, who worked on the study at MIT.

"We don't see very much difference between people who start at birth and people who start at 10, but we start seeing a decline after that."

To get to those conclusions, the researchers looked at the results of a grammar quiz taken by nearly 670,000 people. To encourage more people to take the test and share it on social media, the team tried to make it as entertaining as possible.

That meant combining questions that highlighted English dialects as well as ones that highlighted grammatical errors. In Canada, for example, the phrase "I'm done dinner" would make perfect sense, but not to any other English speakers.

At the end of the test, the quiz tries to guess your native language and dialect, another hook that helped it get shared widely.

"The next few weeks were spent keeping the website running, because the amount of traffic we were getting was just overwhelming," says Hartshorne. "That's how I knew the experiment was sufficiently fun."

Participants were also asked about their current age and the age at which they started learning English, as well as other bits of information.

A total of 246,497 people who took the survey had grown up only speaking English, while the rest knew two or more languages from an early age. A total of 38 languages were covered by the participants.

The data was then pushed through a variety of computational models to identify the age limit of 17 or 18, when our ability to learn the grammatical nuances of a new language seems to start declining.

What's not yet clear is why this drop-off occurs – it could be down to a biological, social, or cultural change, according to the researchers. In other words, it might be something inherent in our brains, or something that changes about our life circumstances.

To help get more answers, the researchers have made their data public for other scientists to take advantage of. They also point out that adults can still be fantastic learners, but from this data at least, they don't appear to reach the fluency of native speakers if they start after their teens.

However, it's worth bearing in mind there are some limitations to the study: the quiz used to collect the data only covers grammar skills, for instance. Other experts weren't so sure about the study's conclusions.

"The suggestion that you can't reach native-like ability if you don't start early is questionable," linguistics professor Marilyn Vihman from the University of York in the UK, who wasn't involved in the study, told the BBC.

"I don't think there is a critical age as such, just a plateau that sets in after the teen years for most but not all speakers."

Even if you don't end up being able to pass for a native, learning a second language has been linked to a whole host of brain benefits. A study from 2014 found that learning another language could help to make the brain more efficient, no matter what your age.

Meanwhile bilingual brains have been found to be better able to manage attention and focus, according to a 2016 study of 99 volunteers. Add to that all the cultural and social benefits, and language learning at any age is still absolutely worth encouraging.

As for this latest research, the team behind it is hoping it can eventually teach us more about how our learning ability evolves over time.

"It's been very difficult until now to get all the data you would need to answer this question of how long the critical period lasts," says one of the researchers, Josh Tenenbaum from MIT.

"This is one of those rare opportunities in science where we could work on a question that is very old, that many smart people have thought about and written about, and take a new perspective and see something that maybe other people haven't."

The research has been published in Cognition.