A sweeping new study published in Science has put hard numbers on a transformation that software developers have felt for years: artificial intelligence is now responsible for nearly one-third of all newly written code on GitHub in the United States[1]. And the share is rising fast.
The study, led by researchers at the Complexity Science Hub (CSH) and Utrecht University[1], analyzed more than 30 million Python contributions from roughly 160,000 developers on GitHub[1]. Using a specially trained neural classifier to detect AI-generated code, the team found that the share of AI-assisted Python functions in the U.S. climbed from 5% in 2022 to approximately 29% by late 2024, a near-sixfold increase in under three years[1].
"The results show extremely rapid diffusion. In the U.S., AI-assisted coding jumped from around 5% in 2022 to nearly 30% in the last quarter of 2024."[2] -- Frank Neffke, Complexity Science Hub
The adoption is not uniform across borders. Germany reached 23% and France 24% by the study's end date, while India, a late but aggressive adopter, hit 20%. China and Russia lagged considerably, at 12% and 15% respectively, hampered by government restrictions on leading Western AI models and, in China's case, a domestic ecosystem still maturing at the time the data was collected[1].
The study's most consequential finding may not be the headline figure but what lies beneath it. Generative AI tools are used most heavily by less experienced programmers, yet the productivity gains flow almost exclusively to senior developers[1].
Experienced coders using AI saw measurable increases in output volume, breadth of libraries used, and willingness to explore new functionality. Early-career developers, by contrast, showed no statistically significant productivity benefit[1].
The implication is pointed: AI coding tools, at least in their current form, amplify existing capability rather than democratize it.
At the scale of the U.S. software industry, where firms spend an estimated $600 billion annually on coding-related wages[1], even a modest aggregate productivity gain of 3.6%[1] translates to tens of billions of dollars in economic value.
Figures purporting to quantify AI's share of code have circulated widely and loosely in recent years. GitHub's own claim that AI accounts for 41% of new code[2], and an earlier 25% figure that appeared across tech media, were based on narrower or less rigorous methodologies (typically measuring code accepted from autocomplete suggestions within Copilot sessions, not AI-generated code across the broader developer population).
Sign in to join the discussion.
The CSH study's neural-classifier approach, applied across tens of millions of open-source contributions, is the most methodologically robust public measurement to date[2].
The study's data ends in early 2025, before the mainstream breakout of agentic coding tools such as Claude Code and Cursor's agent mode, and before DeepSeek's domestic Chinese models became widely available. The researchers themselves note that DeepSeek's emergence could narrow the gap between China and the West considerably[1].
If the 5%-to-29% trajectory of the past three years continues, the question of whether AI writes most new code is no longer hypothetical, it is a matter of when.