How Much Code Does AI Write? The 2026 Reality Check 🤖

Thornelo Avatar
14 min read
how-much-code-does-ai-write

AI now writes 75% of Google’s new code. Yet in a controlled trial, AI tools made experienced developers 19% slower. Both stats are real, and that tension is the whole story. 🔥

So how much code does AI write in 2026, for real? Depending on who’s counting, AI writes roughly a quarter to three-quarters of new code. The answer swings on whether you mean code generated, code accepted, or code that survives review and ships to production, so let’s unpack it properly.

⚡ Key Takeaways

  • Google: 75% of all new code is AI-generated and engineer-approved as of April 2026, up from 50% in fall 2025.
  • Average pro dev: JetBrains’ survey of 15,000+ developers puts fully agent-written code at about 47% of their work code, with another ~38% written with AI help.
  • Independent measurement: a peer-reviewed Science study by Daniotti, Wachs, Feng and Neffke, which ran a classifier over 30M+ GitHub commits by 160,097 developers, estimated AI wrote 29% of US Python functions by the end of 2024.
  • Agents own the first draft: more than 40% of GitHub pull requests started with an agent’s draft by September 2026, up from 17% in March.
  • Acceptance isn’t automatic: in GitHub’s Accenture study, developers accepted about 30% of Copilot suggestions and kept 88% of the accepted characters. Human review also filters every company figure.
  • Quality lags volume: Veracode’s 2026 GenAI Code Security Report puts the average security pass rate across 100+ models at 56%, barely changed from 55% in its first report. Duplicated code blocks are up 81% since 2023.
  • Careers are shifting: seniors adopt agents fastest, while employment of US software developers aged 22–25 fell nearly 20% from its late-2022 peak.

How Much Code Does AI Write in 2026? The Short Answer

For a typical professional developer, AI agents fully write close to half of their code, and AI assists with most of the rest. At the company level, Google reports 75% of new code is AI-generated, while independent measurement of public code lands lower, around 25–30%.

The headline number comes from Sundar Pichai at Cloud Next 2026, where Google said 75% of all new code at Google is now AI-generated and approved by engineers. blog That figure was “more than a quarter” in October 2024, so the curve is steep fr.

For everyone outside Big Tech, the best broad snapshot is JetBrains’ study of how much code developers really let agents write. Over half of developers now write less than 20% of their code by hand, and one in five writes zero code without AI help.

Definition — AI-generated code: AI-generated code is source code whose first draft was produced by a large language model, through autocomplete, chat or an autonomous agent, rather than typed by a human.

It usually still counts as AI-generated after a developer edits, reviews and approves it, which is why company-reported shares run higher than detector-based estimates.

Why Every “How Much Code Is Written by AI” Stat Disagrees

Stats on how much code AI writes disagree because they measure different things: new code vs all code, generated vs accepted, and self-reports vs telemetry. Once you know what each number counts, the 25%-to-75% spread stops looking like a contradiction.

SourceAI shareWhat it actually countsHow it was measured
Google (April 2026)75%New code, AI-generated and engineer-approvedCompany self-report
JetBrains survey (May–July 2026)~47%Developers’ work code fully written by agents last monthSurvey of 15,000+ professionals
Sonar State of Code (2026)42%Committed code that’s AI-generated or significantly AI-assistedSurvey of 1,100+ developers
Science journal study (2026)29%US Python functions on GitHub, end of 2024ML classifier on 30M+ commits
Microsoft (April 2025)20–30%Code in repos “probably all written by software”CEO estimate
GitHub Octoverse (2026)40%+Pull requests whose first draft came from a detectable agentPlatform telemetry

The lowkey biggest variable is “new” vs “all” code. Google’s 75% covers fresh code only, secondtalent while decades of legacy code in any repo still came from humans. A company can hit 75% on new work and still have a codebase that’s mostly human-written. github

The second variable is who’s reporting. Surveys capture what developers believe, telemetry captures what tools logged, and classifiers guess authorship from code style. Each has blind spots, so treat any single AI-generated code percentage as a range, not a fact.

Who’s Actually Writing the Code?

AI coding agents now write far more code than autocomplete ever did, because they draft whole files, run tests and open pull requests instead of finishing a single line. That shift from suggestion to delegation is the main reason AI code shares jumped in 2025–2026.

Definition — AI coding agent: An AI coding agent is a tool that takes a goal, such as fixing an issue, and works through it on its own: reading the codebase, editing multiple files, running commands and tests, then handing back a diff or pull request for human review. Autocomplete only predicts the next few lines.

JetBrains found three clear developer types. Agentic coders (~31% of developers) get about 84% of their code from agents, AI-assisted coders (~47%) get about 40%, and manual coders (~23%) get about 10%.

The tooling data points the same way. Over on GitHub, 55% of Copilot’s monthly active users now use agentic features, up from 35% a year earlier.

Anthropic’s own analysis of coding conversations classified 79% of Claude Code sessions as automation, compared with 49% on the regular Claude.ai chat. anthropic

AI coding tool typeWhat it writesHuman role2026 signal
Inline autocompleteNext line or blockAccept or reject each suggestion~30% of Copilot suggestions accepted in GitHub’s Accenture study
Chat assistantsSnippets, explanations, fixesCopy, adapt, paste49% of Claude.ai coding chats classified as automation
IDE agents (e.g., Cursor)Multi-file edits inside the editorSteer and review diffsCursor users average 58% agent-generated code
Terminal and cloud agents (e.g., Claude Code, Codex, Copilot cloud agent)Full features and pull requestsDefine the task, review the PR40%+ of GitHub PRs start as an agent draft

Agents aren’t just for backend grind either. Creators are already using them for visual work like motion graphics with Claude, which shows how far “code” now stretches beyond classic apps.

How Much Code Does AI Write That Actually Reaches Production?

Less AI code ships than gets generated, but more than skeptics assume. Most company figures already count only reviewed, accepted code, and on GitHub agent-started pull requests now merge at rates similar to human ones.

Definition — Acceptance rate vs survival rate: Acceptance rate is the share of AI suggestions a developer keeps in the moment. Survival rate is the share of that accepted code still in the codebase weeks later, after review, edits and reverts. Acceptance shows convenience; survival shows whether AI-generated code in production actually holds up.

Think of it as a funnel. In GitHub’s enterprise study with Accenture, developers accepted about 30% of Copilot’s suggestions and kept 88% of the accepted characters.

Satya Nadella said in 2025 that Microsoft’s acceptance rate sat around 30–40% and was climbing.

Further down the funnel, the GitHub Octoverse 2026 report counted 110 million agent-started pull requests in September 2026 alone. The share of agent PRs merged within two weeks rose from 83% in February to 90% in September, roughly in line with the ~86% for PRs without detected agent involvement.

There’s a ceiling, though. In Stack Overflow’s 2026 survey, developers mainly use AI for generating code in familiar areas, while only about 20% use it for deploying, operating or troubleshooting production systems. AI drafts the code; humans still own the pager.

Real-world splits also vary by codebase. Plenty of developers report heavy AI use on greenfield side projects but much lower shares at work on legacy systems, where understanding old business logic matters more than generating syntax.

Which Coding Tasks Does AI Write the Most?

AI writes the most code on well-scoped, checkable work like familiar-pattern features, tests and debugging, and in popular languages like Go, JavaScript and TypeScript. It writes the least in low-level languages, legacy systems and anything that involves human judgment.

Task or tech stackAI share or usage in 2026What it means
Generating code in a familiar area69% of AI users do thisTop use case: fast, easy to verify
Debugging, troubleshooting, refactoring64%AI is a strong second pair of eyes
Writing or improving tests58%Tests are cheap to generate and check
Generating code in an unfamiliar area56%Useful, but riskier to trust
Go, JavaScript, TypeScript developers54–55% of code agent-writtenMost agentic stacks
Java and Python developers48–51% of code agent-writtenMiddle of the pack
C and C++ developers~38% still written fully by handHighest manual share

The usage numbers come from the Stack Overflow 2026 Developer Survey AI results, which found 73% of respondents using coding assistants or agents daily. The language split is from JetBrains, and it echoes Nadella’s 2025 remark that Microsoft saw more AI progress in Python than C++.

The pattern is simple: AI wins where answers are checkable. In the same survey, only 35% found AI useful for communication tasks and 49% for design, versus 70%+ for implementation and debugging.

AI Code Quality and Security in 2026

AI code volume has exploded, but code quality and security haven’t kept pace. Models now write code that compiles almost every time, yet it passes security tests only about 56% of the time,and maintainability signals are trending the wrong way.

Definition — Verification gap: The verification gap is the distance between how much AI-generated code developers ship and how much of it they actually check. It grows when output speeds up but review time, tests and security scanning stay flat, turning fast code into hidden technical debt.

Veracode’s 2026 GenAI Code Security Report put the average security pass rate across 100+ models at 56%, meaning about 44% of tasks produced code with a known vulnerability. Syntax correctness, meanwhile, sits near 100%. That’s a big L for “it compiles, ship it” culture.

GitClear’s analysis of 623 million code changes found duplicated code blocks rising from 40.3 to 73.0 per million changed lines between 2023 and 2026, an 81% jump. Moved code, its proxy for refactoring, fell from 13% to 3.8% of changed lines.

Trust data tells the same story. Sonar found 96% of developers don’t fully trust AI-generated code is functionally correct, yet only 48% always check it before committing. Google’s 2025 DORA report found AI adoption linked to higher throughput but still tied to more delivery instability.

6 Hype Red Flags in AI Coding Stats

Most viral AI coding stats are true but stripped of context. Before you share or panic over a number, check it against these six red flags.

  1. “New code” swapped for “all code.” A 75% share of new code is not 75% of the software you use. Legacy code dilutes it massively.
  2. Predictions dressed as data. Speaking at the Council on Foreign Relations on March 10, 2025, Anthropic’s Dario Amodei predicted that within three to six months AI would be “writing 90 percent of the code,” and “essentially all of the code” within twelve months. That happened at some companies and teams, but not across the industry.
  3. Perceived speed vs measured speed. In METR’s randomized trial of experienced open-source developers, devs expected AI to speed them up, felt about 20% faster afterward, and were actually 19% slower.
  4. Hedged CEO language. Nadella’s figure was literally “maybe 20%, 30%” of code “probably all written by software.” TechCrunchtomshardware That’s an estimate, not an audit.
  5. Vendor-funded research. JetBrains, GitHub, Sonar, Veracode and GitClear all sell developer tools. nTheir data is still useful, but read the methodology before you read the headline.
  6. Lines of code as a win. More lines isn’t more value. The Science study linked 29% AI adoption to just a 3.6% rise in quarterly code output, alphaxiv and duplication trends show volume can mean bloat.

What AI Code Means for Developer Careers and Junior Hiring

AI isn’t deleting the developer job, but it’s squeezing the entry ramp. Seniors who can steer agents gain leverage, while junior developers face fewer openings and a higher bar for what “entry-level” means.

Stanford’s “Canaries in the Coal Mine?” paper by Erik Brynjolfsson, Bharat Chandar and Ruyu Chen used ADP payroll data and found employment for US software developers aged 22–25 fell nearly 20% from its late-2022 peak by September 2025, while older developers kept growing. That’s the clearest hard signal so far, and it hits exactly where AI automates rather than augments.

The adoption gap cuts the other way too. JetBrains found about a quarter of senior developers get over 80% of their code from agents, while juniors lean toward AI-assisted workflows.

The Science study found newer developers use AI more, yet measurable productivity gains went to experienced developers.

Translation: juniors use AI, but seniors profit from it, because judging AI output takes experience. We break down the hiring side in our guide to tech hiring in the AI era, and the learning side in learning software engineering in the AI era.

What Should Developers Do About AI Writing Code?

Stop asking whether to use AI and start deciding which code you hand over and how you verify it. Your edge is no longer typing speed; it’s specification, review and system judgment.

If you are…Do thisAvoid this
Student or junior devBuild projects where you can explain every line; use AI to review and quiz youShipping agent output you can’t debug
Mid-level devHand boilerplate, tests and migrations to agents; own architecture and edge casesLetting review time shrink as output grows
Senior or leadSet team rules for agent PRs, security scans and ownershipMeasuring wins in lines of code
Freelancer or indie builderUse agents to scope and ship faster, then price on outcomes, not hoursDelivering unaudited AI-generated code to clients

A good default: let AI write first drafts of anything you can verify quickly, and write or deeply review anything touching auth, payments, data deletion or concurrency. That alone kills most of the risks in the security data. 🚀

Pro Tip Competitors Miss: Measure Your Own AI Survival Rate

Company percentages tell you nothing about your codebase. For two weeks, tag every AI-drafted commit with a git trailer such as AI-Assisted: yes, then use git log and git blame 30 days later to see how many of those lines survived untouched.

That gives you a personal survival rate, the one number that answers how much code AI writes that actually lasts in your work. It also makes a killer portfolio talking point, because almost nobody can quantify their own AI workflow.

How Much Code Does AI Write?

What percentage of code is written by AI in 2026?

There’s no single global figure. Google reports 75% of its new code is AI-generated, developers in JetBrains’ 2026 survey say agents fully write about 47% of their code, and a Science study estimated 29% of US Python functions on GitHub were AI-written by the end of 2024.

How much of Google’s code is written by AI?

At Cloud Next in April 2026, Sundar Pichai said 75% of all new code at Google is AI-generated and approved by engineers. That was up from 50% in fall 2025 and more than 25% in October 2024. The figure covers new code, not Google’s entire codebase.

Does AI-generated code actually reach production?

Yes, a lot of it does, but only after human review. In GitHub’s Accenture study developers accepted about 30% of Copilot suggestions, and GitHub’s 2026 Octoverse data shows agent-started pull requests merging at rates similar to other pull requests.

Is AI-generated code secure?

Not by default. Veracode’s 2026 testing of more than 100 models found an average security pass rate of 56%, meaning about 44% of tasks produced code with a known vulnerability. Security scanning and human review are still essential.

Do AI coding tools make developers faster?

It depends on the developer and the task. METR’s 2025 randomized trial found experienced open-source developers were 19% slower with AI on familiar codebases, even though they felt about 20% faster. Gains tend to be larger on boilerplate, tests and unfamiliar code.

Will AI replace software developers?

AI is changing the job more than erasing it, since engineers still define, review and approve what ships. The biggest pressure is on entry-level roles: employment for US software developers aged 22 to 25 fell nearly 20% from its late-2022 peak by September 2025.

Which programming languages does AI write the most code in?

JetBrains’ 2026 survey found Go, JavaScript and TypeScript developers report the highest share of agent-written code at 54 to 55%. Java and Python sit at 48 to 51%, while C and C++ developers keep the most hand-written code.

How Much Code Does AI Write, Really?

So, how much code does AI write? In 2026, roughly half of a typical developer’s code starts as an AI draft, up to three-quarters of new code at AI-first giants like Google, and around a quarter to a third in independent measurements. The share that reaches production is lower, filtered by review, and still carries real quality and security risk.

The W goes to developers who treat AI as a fast junior teammate, not an oracle. Your next step: run the two-week survival-rate experiment above, so you know your own AI number instead of quoting someone else’s.

Thornelo Avatar

Written by

Leave a comment

Your email address will not be published. Required fields are marked *