R vs Python: Stack Overflow’s Survey Puts Python at 58.0% and R at 4.5%

Stack Overflow’s 2026 survey technology tables put Python at 58.0% (8,184 of 14,099 respondents, fourth) and R at 4.5% (639), so Python’s lead is 12.8 times. The 57.9% that headlined earlier versions of this page is Stack Overflow’s 2025 figure for Python, not the current one. This page works out what the gap means for choosing between the two languages.

Google · Preferred Sources

Don't miss new tech stories on Google

Add Tech Insider once in the Google app and our stories appear in your news suggestions.

Add Now

Python is flat on last year, and R sits between Dart and Nix

The history table on the same Stack Overflow page lists 57.9% for Python in its 2025 column, against 58.0% in 2026. A move of 0.1 points is well inside the sampling band worked out below, so read Python as unchanged. The 2026 ranking, with R’s neighbours, looks like this:

LanguageRespondentsShare of 14,099
JavaScript8,74262.0%
SQL8,23758.4%
HTML/CSS8,21258.2%
Python8,18458.0%
Bash/Shell (all shells)7,23151.3%
Swift8315.9%
Ruby8235.8%
Dart6974.9%
R6394.5%
Nix6234.4%

The gap is 8,184 divided by 639, which is 12.8. Dividing the rounded percentages (58.0 by 4.5) gives 12.9, so quote 12.8 when you cite the counts. The ratios, sampling bands and tool multiples on this page are our own arithmetic on Stack Overflow’s published counts. Stack Overflow’s technology overview lists Python as the fourth most-used language and JavaScript as first for 12 years in a row.

What a 14,099-respondent base can carry

The language figures come from one question: which languages respondents had done extensive development work in over the past year. The same question also covers languages they want to use next and those they used AI tools with. It was answered by 14,099 people, 45.6% of the 30,903 responses the survey drew from 169 countries across 467 technologies. The wording matters for R: an analyst who runs R weekly but does not describe it as extensive development work may not tick it, so 4.5% measures developer-style use, not everyone who touches the language.

On that base, and assuming a simple random sample, the standard error is 0.17 points for R and 0.42 points for Python. That gives a 95% band of 0.3 points either side of 4.5%, so 4.2 to 4.8%, and 0.8 points either side of 58.0%, so 57.2 to 58.8%. Respondents chose to take part, which makes real uncertainty larger than these figures. A change of a few tenths of a point in R, in either direction, is not a finding.

Within data-oriented languages the order is clear: MATLAB is at 3.6% (513), Fortran at 1.7% (239) and Julia at 1.5% (211), all below R.

The share also varies by cohort. Among respondents with 16 or more years of professional experience, Python is at 53.2% (2,818), still fourth, behind SQL at 63.0%, JavaScript at 62.0% and HTML/CSS at 56.4%.

Python 3.14, uv and pytest: what changed under the comparison

Python 3.14, released in October 2025, made free-threaded Python officially supported (PEP 779) and added an experimental just-in-time compiler to the Windows and macOS binaries; PEP 761 ended PGP signatures for official releases, per the Python 3.14 release notes.

The survey’s tools tables show which Python tools respondents use:

ToolRespondentsShare
pip4,58742.1%
pytest (third among code testing tools)2,97228.0%
uv2,53423.3%
Poetry8017.4%
Conda7216.6%

Stack Overflow’s survey overview adds that for coding agents, “AI seems to love Python above nearly all else, coming in at 39% usage.” Readers settling on Python can compare editors in our PyCharm vs VS Code comparison.

TIOBE, CRAN and R releases as the vendors’ pages read on 13 November 2026

The TIOBE index for Nov 2026, read on 13 November 2026, has Python first at 20.86% and R seventh at 2.27%, up from twelfth a year earlier. Python’s ratio over R there is 9.2 (20.86 divided by 2.27), against 12.8 in the survey counts. These come from different counters, so each ratio describes only its own counter. For the earlier TIOBE reading, see our TIOBE index report.

LanguageRank, Nov 2026Rank, Nov 2025RatingChange
Python1120.86%-2.51%
R7122.27%+0.60%

On the R side, the CRAN packages page, read on 13 November 2026, says the repository features 25,736 available packages. CRAN’s release list for R, read the same day, runs as follows:

R releaseListed as
R 4.6.2October 2026
R 4.6.1June 2026
R 4.6.0April 2026
R 4.5.3March 2026

The same task in both languages

Fitting a linear model in each language shows the difference in shape. The Python version uses pandas and statsmodels; the R version uses base functions.

# Python: fit a linear model with statsmodels
import pandas as pd
import statsmodels.formula.api as smf

df = pd.read_csv("mtcars.csv")
model = smf.ols("mpg ~ wt + hp", data=df).fit()
print(model.summary())
# R: the same linear model
df <- read.csv("mtcars.csv")
model <- lm(mpg ~ wt + hp, data = df)
summary(model)

A grouped summary is the other common task. Both snippets assume a flights data frame with dest, carrier and arr_delay columns.

# R tidyverse: filter, group, summarise, sort
library(dplyr)
flights |>
  filter(dest == "SFO") |>
  group_by(carrier) |>
  summarise(mean_delay = mean(arr_delay, na.rm = TRUE)) |>
  arrange(desc(mean_delay))
# Python pandas equivalent
import pandas as pd
(flights.query("dest == 'SFO'")
        .groupby("carrier", as_index=False)["arr_delay"]
        .mean()
        .sort_values("arr_delay", ascending=False))

Which ecosystem each field leans on

The survey cannot say which language fits your field, so here are the main packages each side uses for common data jobs.

JobPythonR
Classical statisticsstatsmodels, SciPyBase R, fixest, lme4
Econometricslinearmodelsfixest, plm, vars
BioinformaticsBioPython, scanpyBioconductor
VisualisationMatplotlib, Plotly, Seabornggplot2, plotly for R
Deep learningPyTorch, TensorFlow, JAXtorch for R, keras3
Web scrapingrequests, BeautifulSoup, Playwrightrvest, httr2
DashboardsStreamlit, DashShiny

Python first, with three conditions that make R the better pick

Start with Python. It is the fourth most-used language in the survey, 12.8 times R’s count, the leader for coding-agent use at 39%, and 23.3% of respondents already use uv. Choose R when the people who review or commission your work already work in it, when you inherit an R codebase that runs well and the cost of porting buys nothing, or when your work is mostly classical statistical modelling, as in the linear-model example above. R’s rise to seventh in TIOBE, from twelfth, points the same way. None of that depends on the 4.5%, which says how many developers report extensive R work, not how well R fits your field. To decide, read ten job ads from your own target field and count which language each names; if R appears in most of them, start there.

Sofia Lindström

Sofia Lindström

Security and privacy

Sofia Lindström writes about security and privacy for Tech Insider: software vulnerabilities and the updates that fix them, data breaches, privacy rules and how products handle personal data. She works from vendor advisories, official vulnerability catalogues and the documents behind each story.

View all articles