# Cursor vs Copilot Survey Data: 12 Steps, 80 Min [2026]

> Source: <https://shattered.io/cursor-vs-copilot-stack-overflow-survey-pandas-12-steps-2026/>
> Published: 2026-11-16 03:57:46+00:00

Two numbers in one Stack Overflow sentence can mislead a careful reader. For the 2025 edition, [the survey’s AI page](https://survey.stackoverflow.co/2025/ai) reported that 18% of developers used Cursor, while GitHub Copilot landed at 68% among a narrower group. The groups under each figure differ, so the gap between 18 and 68 says less about Cursor vs GitHub Copilot than it first appears to.

In the 2025 Stack Overflow Developer Survey, 18% of developers reported using Cursor, while GitHub Copilot was reported as a primary AI-assistance tool by 68% of respondents using out-of-the-box AI assistance.

Fix that by computing the shares yourself from the raw CSV. Twelve steps and about 80 minutes take you from an empty folder to a tested pandas pipeline that finds the tool columns, picks a defensible denominator, adds confidence intervals, measures overlap, splits by role and flags every caveat. The 2026 edition fits the same pipeline, and Stack Overflow says it collected more than 30,000 responses from 169 countries and covered 467 technologies.

A [seat-based market share audit](https://shattered.io/cursor-vs-github-copilot-market-share-audit-12-steps-2026/) counts licenses and invoices inside one company. A survey counts what developers say they use. Both belong in a buying decision, and neither replaces the other.

Don't miss new tech stories on Google

Add Shattered once in the Google app and our stories show up in your news suggestions.

[Add now](https://www.google.com/preferences/source?hl=en&q=https%3A%2F%2Fshattered.io%2F)

## What the Survey Measures, and What It Cannot

The CSV records self-reported answers from people who found the survey and chose to finish it. That is a convenience sample, not a census of the world’s developers. Treat every share you compute as “share of respondents who answered this question”, and treat the file as unweighted unless the edition you downloaded ships a weight column.

Stack Overflow’s press release for the 2026 edition, dated October 6, 2026, gives the broad AI picture. It says coding assistants or coding agents are used by 66% of respondents, general-purpose chat tools by 63% and automated agent workflows by 26.2%, while only 17.2% say they do not use AI tools. Those figures describe categories of use. The material retrieved for this piece contained no Cursor or Copilot share for 2026, which makes the raw CSV the only place to get one.

Cursor and GitHub Copilot also differ in kind. Cursor is an editor and agent product from Anysphere, and its release notes show a steady run of additions, including Claude Sonnet 5.5 and Grok 4.7. Copilot is a service that spans VS Code, the CLI, the web, Slack and Microsoft Teams, and [Copilot’s expansion into more editors](https://shattered.io/github-copilot-xcode-jetbrains-air-two-days-2026/) keeps widening that reach. GitHub shipped Claude Fable 5.2 on November 9, Gemini 4 Carbon on November 10 and Gemini 4 Hydrogen on November 13. A respondent can tick both products on the same form, so the two shares overlap and will not sum to a neat total.

Bundling muddies “use” further. On October 28, 2026, GitHub began including Copilot with GitHub Enterprise for every licensed user at eligible enterprise customers, and users without that license can buy Copilot Standalone at $10 per user per month. A developer who answers “yes, I use Copilot” may simply have been handed a seat. On the Cursor side, it reportedly moved to a plan structure called The X Subscription in recent weeks, but the price points rest on secondary sources, so this pipeline never leans on price data. For what each tool charges and throttles, see the [pricing and usage limits comparison](https://shattered.io/claude-code-vs-cursor-vs-github-copilot-pricing-limits-2026/).

Segments matter as much as totals. A learner subgroup and a professional subgroup can sit far apart, so Step 9 splits the data by role. Even with those limits the survey earns its place, because it is one of the few public datasets where a developer, not a vendor, reports which assistant sits in the editor. Vendor dashboards count activity inside the vendor’s own product. A survey asks people about their whole toolbox, including the tools they quietly dropped. The same survey also feeds [a Codex vs Claude Code usage comparison](https://shattered.io/codex-vs-claude-code-stack-overflow-65-5-vs-29-5-2026/), which shows the same denominators problem in a different matchup.

## Prerequisites and Versions

You need a terminal, a text editor and basic pandas literacy (read a CSV, filter rows, group by a column). No GPU, no API keys and no paid accounts are involved. Everything below was run on Linux with Python 3.12, and the same commands work on macOS and Windows with minor path changes.

| Component | Version used | Why it matters | 
|---|---|---|
| Python | 3.12 or newer | python.org lists 3.15.2 as the latest stable release as of November 16, 2026 | 
| pandas | 3.1.1 | Maintenance release, after 3.1.0 on October 22 | 
| pytest | 8 or newer | Runs the four checks in Step 12 | 
| tabulate | 0.9 or newer | Lets pandas write Markdown tables | 
| Survey CSV | Latest edition from the survey site | The 2026 edition is the newest one retrieved | 
| Disk | Room for the CSV and its unzipped copy | The ZIP and the extracted file both land on disk | 

Skip Python 3.16.0 alpha 2. It is an early developer preview, not a stable release, and it is meant for testing only. Stay on a stable branch.

Pin pandas exactly. The pandas documentation already carries [a 3.1.2 development page](https://pandas.pydata.org/pandas-docs/stable/dev/whatsnew/v3.1.2.html) with a placeholder November date, so a loose requirement can move under you mid-analysis. Pandas 3 also stores text columns in a dedicated string dtype by default, which affects how missing values behave in Step 3. In practice, a skipped question arrives as a missing value, the `str` accessor passes it through untouched, and the helper functions in later steps check for it explicitly instead of assuming every cell holds text.

Block out 80 minutes. Steps 1 to 3 take about 15, Steps 4 to 7 about 30, Steps 8 to 11 about 25, and Step 12 plus the final run about 10. If you only want shares, stop after Step 7.

## Read the Questionnaire Before You Touch the Data

A CSV without its questionnaire invites wrong answers. Spend ten minutes on the survey site’s question list and note four things for each AI-related question: the exact wording, whether it allows several answers, who sees it, and what the answer list contains. The code in later steps handles the mechanics, but only you can judge whether two columns measure the same thing.

Wording decides what a “share” means. A question about tools a developer “used regularly” yields a different population than one about tools they “tried” or “want to use next year”. If the edition asks both, you have two shares per tool, and they answer different questions. Keep them in separate tables and label them plainly.

Screening decides who sits in the denominator. Some questions go only to people who said they use AI tools at all, or only to professional developers. A tool share computed among that screened group will look higher than the same count over every respondent. The press release figure that 17.2% of respondents say they do not use AI tools hints at the size of the effect: any question shown only to AI users starts from a smaller base than the full file.

Answer lists decide what you can measure. A tool must appear in the list before anyone can tick it, and a write-in “other” box rarely gets coded into clean categories. If Cursor or Copilot is missing from an edition’s list, the right conclusion is “not measured”, never “zero”.

| Check | Where to look | What you record | 
|---|---|---|
| Question wording | Questionnaire or survey results page | Used, tried or wanted, and the time window | 
| Multi-select | Answer format in the questionnaire | Whether the CSV stores several answers per cell | 
| Screener | Routing notes | Which respondents never saw the question | 
| Answer list | Options shown | Whether Cursor and GitHub Copilot appear by name | 
| Edition | File name and download page | Year, file name and checksum | 
| License | Survey site footer | ODbL 1.0 and DbCL 1.0 attribution terms | 

Write the answers in a plain text file next to the data. When a reader asks, six months from now, why your Cursor share differs from a number on a chart, that file is the quickest way to find the reason.

## Steps 1 to 3: Environment, Data and Loading

### Step 1: Create the project and pin the environment

Make a folder, a virtual environment and a requirements file. Pinning protects the checksums and the outputs you will compare later.

```
mkdir survey-share && cd survey-share
mkdir data tests out
python3 -m venv .venv
source .venv/bin/activate        # Windows: .venv\Scripts\activate
printf 'pandas==3.1.1\npytest>=8\ntabulate>=0.9\n' > requirements.txt
pip install -r requirements.txt
python -c "import pandas; print(pandas.__version__)"
```

Expected output from the last line:

```
3.1.1
```

### Step 2: Download the edition and fingerprint the file

Open the survey site, pick the edition, and follow its download link. An [Opensource.com walkthrough from 2019](https://opensource.com/article/19/9/stack-overflow-survey-python-pandas) told readers to download the CSV from Google Drive, unzip it, and rely on pandas’ native CSV reader. That Drive location is from 2019, so do not trust it today. The 2026 results page links the StackExchange Survey repository on GitHub, and your edition’s download link is the one to follow. File names differ by edition, so rename yours to something stable.

```
unzip -o ~/Downloads/stack-overflow-survey-2026.zip -d data/
mv data/*results*.csv data/survey_2026.csv
sha256sum data/survey_2026.csv | tee data/survey_2026.sha256
```

The checksum goes into every report you generate, so a reader can confirm which file produced which number. The survey data is published under ODbL 1.0 with contents under DbCL 1.0, per the survey site’s footer, so keep the attribution when you publish results.

No file yet, or just want to follow along first? Generate a synthetic one. It plants known shares so you can confirm the pipeline recovers them.

```
"""Write a synthetic survey file with planted shares so the pipeline can be checked."""
import numpy as np
import pandas as pd

rng = np.random.default_rng(2026)
N = 6000

branch = rng.choice(
    ["I am a developer by profession", "I am learning to code", "I code as a hobby"],
    size=N, p=[0.72, 0.18, 0.10],
)
years = np.where(branch == "I am a developer by profession",
                 rng.integers(1, 30, N).astype(str), None)

# planted rates among respondents who answered the tool question
p_cursor = np.where(branch == "I am a developer by profession", 0.24, 0.10)
p_copilot = np.where(branch == "I am a developer by profession", 0.46, 0.38)
cursor = rng.random(N) < p_cursor
copilot = rng.random(N) < np.where(cursor, 0.55, p_copilot)   # overlap is deliberate
answered = rng.random(N) < 0.88                                 # 12% skip the question

def cell(i):
    if not answered[i]:
        return None
    parts = []
    if cursor[i]:
        parts.append("Cursor")
    if copilot[i]:
        parts.append("GitHub Copilot")
    if rng.random() < 0.15:
        parts.append("Microsoft Copilot")                       # look-alike on purpose
    if rng.random() < 0.30:
        parts.append("Visual Studio Code")
    return ";".join(parts) if parts else "None of the above"

df = pd.DataFrame({
    "ResponseId": np.arange(1, N + 1),
    "MainBranch": branch,
    "YearsCodePro": years,
    "AIToolCurrently Using": [cell(i) for i in range(N)],
})
df.to_csv("data/demo_2026.csv", index=False)
print("wrote data/demo_2026.csv", df.shape)
print("planted: cursor", round(float(cursor[answered].mean()), 4),
      "copilot", round(float(copilot[answered].mean()), 4))
```

Run it and note the planted rates:

```
python make_demo_data.py
wrote data/demo_2026.csv (6000, 4)
planted: cursor 0.1977 copilot 0.4656
```

Everything in this file is invented. The numbers say nothing about real developers. They exist so Steps 4 to 12 have a target to hit.

### Step 3: Load the CSV without losing the blanks

Read every column as text. Mixed-type columns trigger warnings and silent coercion, and blank cells carry meaning: a blank means the respondent skipped the question, which is different from answering “none”.

``` python
import hashlib
import pandas as pd

def sha256(path, chunk=1 << 20):
    h = hashlib.sha256()
    with open(path, "rb") as f:
        while block := f.read(chunk):
            h.update(block)
    return h.hexdigest()

def load_survey(path):
    df = pd.read_csv(path, dtype="str")
    df.columns = [c.strip() for c in df.columns]
    return df
```

Two details deserve attention. `dtype="str"` keeps numeric-looking columns such as years of experience as text, which is fine because you only count tokens here. The `strip()` on column names protects you from a stray space in a header, a surprisingly common reason for a `KeyError` later.

## Steps 4 and 5: Find Where the Tools Live and Define Them

### Step 4: Define the tools with exact matching

Put the match rules in one small file. Exact names beat fuzzy patterns, because “Copilot” alone also matches Microsoft Copilot, a different product.

``` python
import re

# Exact product names only. "Copilot" alone would also match Microsoft Copilot.
TOOLS = {
    "Cursor": re.compile(r"^cursor$", re.I),
    "GitHub Copilot": re.compile(r"^github copilot$", re.I),
}
LOOKALIKE = re.compile(r"cursor|copilot", re.I)
```

The `LOOKALIKE` pattern is deliberately wider. It never counts anything. It only surfaces every token that contains the words, so you can see what the exact patterns would miss or wrongly include.

### Step 5: Discover the tool columns instead of hard-coding them

Column names change between editions, and Stack Overflow also adds, renames and drops questions. Searching the data beats guessing a header. The script walks every column, skips ones that never mention the tools, splits multi-select cells on the semicolon separator and lists every look-alike token it finds.

``` python
import sys
import pandas as pd
from load import load_survey
from tools import TOOLS, LOOKALIKE

def find_tool_columns(df):
    rows = []
    for col in df.columns:
        s = df[col]
        if not s.str.contains(LOOKALIKE, na=False).any():
            continue
        toks = s.dropna().str.split(";").explode().str.strip()
        seen = sorted(set(toks[toks.str.contains(LOOKALIKE)]))
        rows.append({
            "column": col,
            "answered": int(s.notna().sum()),
            "tokens_seen": " | ".join(seen),
        })
    return pd.DataFrame(rows)

if __name__ == "__main__":
    out = find_tool_columns(load_survey(sys.argv[1]))
    print(out.to_string(index=False) if len(out) else "no Cursor/Copilot tokens found")
python discover.py data/survey_2026.csv
```

On the synthetic file the output looks like this:

```
               column  answered                                 tokens_seen
AIToolCurrently Using      5292 Cursor | GitHub Copilot | Microsoft Copilot
```

Read the `tokens_seen` column before moving on. Here it exposes Microsoft Copilot sitting next to the real targets, which is the reason Step 4 uses exact matches. On a real edition you may see two or three columns, for example one for tools used now and one for tools wanted next. Write down the exact column names. You pass them to the pipeline in Step 12.

If the script prints “no Cursor/Copilot tokens found”, the edition may not list the tools at all. Older editions may simply predate Cursor in their answer lists, so zero hits there is a finding, not a bug.

When columns do turn up, sort them by purpose before you pick one. A column that lists tools used in the past year answers “who uses it”. A sibling column about tools a respondent wants to work with next answers “who intends to keep using it”. A third might split out AI-specific tools from general editors. Keep each as a separate run of the pipeline. You can pass several columns at once with repeated `--col` flags, but only when they describe the same thing, because the runner combines them with a logical OR and counts anyone who ticked the tool in any of them.

Check the `answered` count for each column too. A column answered by 5,000 respondents and another answered by 20,000 cannot share a denominator, and the runner will happily mix them if you let it. The safe habit is one question per run, with the answered count printed beside every share.

## Steps 6 and 7: Pick a Denominator and Compute Shares

### Step 6: Decide what “share” means

Every share needs a numerator and a denominator, and you can choose two denominators that both look reasonable:

| Denominator | Definition | Demo result for Cursor | Use it when | 
|---|---|---|---|
| Answered | Respondents who gave any answer to the tool question | Not listed | You report adoption among people who were asked | 
| All rows | Every respondent in the file | Not listed | You need a conservative floor | 
| Segment answered | Answered, within one role or region | Varies by group | You compare groups fairly | 

The gap in the demo comes from respondents who skipped the question. On a survey with more than 30,000 responses and a larger skip rate, the gap can swallow the difference between two tools. Pick one denominator, state it in every table and never mix them in one comparison. Answered rows is the standard choice, and the code defaults to it while keeping the all-rows share for reference. The choice is a judgment call, so write it down before you see the results. Picking the denominator after you spot which one flatters your favorite tool is the oldest trick in survey analysis, and readers notice.

### Step 7: Compute shares with Wilson confidence intervals

A bare percentage hides how much the sample can wobble. Wilson intervals behave well near the extremes, where the textbook normal approximation breaks, and the function needs only `math`.

``` python
import math
import pandas as pd
from tools import TOOLS

def wilson(k, n, z=1.96):
    if n == 0:
        return float("nan"), float("nan")
    p = k / n
    d = 1 + z * z / n
    centre = (p + z * z / (2 * n)) / d
    half = z * math.sqrt(p * (1 - p) / n + z * z / (4 * n * n)) / d
    return centre - half, centre + half

def tool_flags(df, columns, tools=TOOLS):
    """True per respondent if any listed column names the tool; also who answered."""
    answered = pd.Series(False, index=df.index)
    flags = {name: pd.Series(False, index=df.index) for name in tools}
    for col in columns:
        answered |= df[col].notna()
        parts = df[col].str.split(";")
        for name, pat in tools.items():
            flags[name] |= parts.apply(
                lambda xs: isinstance(xs, list) and any(pat.match(x.strip()) for x in xs)
            )
    out = pd.DataFrame(flags)
    out["answered"] = answered
    return out

def share_table(flags, total_rows):
    n_ans = int(flags["answered"].sum())
    rows = []
    for name in [c for c in flags.columns if c != "answered"]:
        k = int(flags[name].sum())
        lo, hi = wilson(k, n_ans)
        rows.append({
            "tool": name, "users": k, "answered": n_ans,
            "share_answered": k / n_ans, "ci_low": lo, "ci_high": hi,
            "share_all_rows": k / total_rows,
        })
    return pd.DataFrame(rows)
```

The function `tool_flags` turns each tool into a True/False column per respondent, OR-ing across every column you pass. That handles editions with separate “used” and “AI tool” questions. Run it:

```
python run.py data/demo_2026.csv --col "AIToolCurrently Using"
tool  users  answered  share_answered  ci_low  ci_high  share_all_rows
        Cursor   1046      5292          0.1977  0.1871   0.2086          0.1743
GitHub Copilot   2464      5292          0.4656  0.4522   0.4791          0.4107
```

Compare the recovered shares with the planted values to confirm the counting logic works. The width of the intervals depends almost entirely on how many people answered, as the next table shows for a tool near 50% and another near 10%.

| Respondents who answered | Confidence interval at 50% | Half-width | Confidence interval at 10% | Half-width | 
|---|---|---|---|---|
| 50 | Not listed | Not listed | Not listed | Not listed | 
| 100 | Not listed | Not listed | 5.5% to 17.4% | 6.0 points | 
| 400 | Not listed | Not listed | Not listed | 3.0 points | 
| 1,000 | Not listed | 3.1 points | Not listed | Not listed | 
| 5,000 | Not listed | 1.4 points | Not listed | 0.8 points | 
| Not listed | Not listed | 0.6 points | Not listed | 0.4 points | 

Those figures come from the same `wilson` function in the code above. They show why a segment of 100 respondents cannot separate two tools that sit eight points apart, and why the full file can. On a real file, a gap between Cursor and Copilot smaller than the combined interval widths is not a finding. The [Cursor vs GitHub Copilot benchmark harness](https://shattered.io/benchmark-cursor-vs-github-copilot-2026/) measures task speed and output quality, which is a separate question from who is using what.

## Steps 8 and 9: Overlap and Segments

### Step 8: Measure overlap between the two tools

Shares alone hide a key fact: many developers use more than one assistant. A four-way split into both, Cursor only, Copilot only and neither shows how much each tool’s audience is exclusive.

``` python
import pandas as pd

def overlap_table(flags):
    f = flags[flags["answered"]]
    cur, cop = f["Cursor"], f["GitHub Copilot"]
    groups = {
        "both": cur & cop,
        "Cursor only": cur & ~cop,
        "GitHub Copilot only": ~cur & cop,
        "neither": ~cur & ~cop,
    }
    rows = [{"group": g, "respondents": int(m.sum()), "share": float(m.mean())}
            for g, m in groups.items()]
    return pd.DataFrame(rows)
group  respondents  share
               both          563 0.1064
        Cursor only          483 0.0913
GitHub Copilot only         1901 0.3592
            neither         2345 0.4431
```

The demo plants a strong link between the two on purpose. In real data the group using both tells you whether developers treat these products as substitutes or as stacked layers. A large group using both argues for reading the two shares as complements. Teams that run both often [move Copilot instructions into Cursor rules](https://shattered.io/cursor-rules-migrate-github-copilot-2026/), which is a sign the tools coexist more than they compete.

Reading the four buckets takes a little judgment, and the table below gives a starting rule for each pattern. Treat the thresholds as prompts for a closer look, not as laws.

| Pattern in the split | Likely reading | Follow-up | 
|---|---|---|
| Large “both”, small “only” groups | Developers stack the tools | Segment by employer size to see who pays | 
| Large “Copilot only”, small “both” | Copilot is the default and Cursor is a niche add-on | Check Cursor share among professionals only | 
| Large “Cursor only” | Cursor is a primary editor for that group | Check for a selection effect in who answers | 
| Large “neither” | Most respondents use other tools or none | Look at which other tools appear in the column | 
| Small “neither” | The question went to a screened group | Recheck the screener in the questionnaire | 

The demo split puts a large share of respondents in the neither group, which in a real file would prompt a look at the other tokens in the column. In the synthetic data they are Visual Studio Code and a None of the above answer, both planted by the generator.

### Step 9: Segment by role and experience

A single total hides who is driving it. Group by a column such as the main-branch or role question, then recompute shares inside each group. The `min_n` guard drops groups too small to trust.

``` python
import pandas as pd
from shares import share_table

def by_segment(df, flags, segment_col, min_n=100):
    rows = []
    for value, idx in df.groupby(segment_col).groups.items():
        sub = flags.loc[idx]
        if int(sub["answered"].sum()) < min_n:
            continue
        t = share_table(sub, len(sub))
        t.insert(0, "segment", value)
        rows.append(t)
    return pd.concat(rows, ignore_index=True) if rows else pd.DataFrame()
python run.py data/demo_2026.csv --col "AIToolCurrently Using" --segment MainBranch
segment           tool  users  answered  share_answered  ci_low  ci_high  share_all_rows
I am a developer by profession         Cursor    885      3781          0.2341  0.2208   0.2478          0.2064
I am a developer by profession GitHub Copilot   1834      3781          0.4851  0.4691   0.5010          0.4278
         I am learning to code         Cursor    107       939          0.1140  0.0952   0.1359          0.1003
         I am learning to code GitHub Copilot    387       939          0.4121  0.3811   0.4439          0.3627
             I code as a hobby         Cursor     54       572          0.0944  0.0731   0.1211          0.0836
             I code as a hobby GitHub Copilot    243       572          0.4248  0.3849   0.4657          0.3762
```

Notice how the demo’s professional group shows a Cursor share more than twice the learner group’s. That is planted structure, not a real-world finding, but it shows why a single headline number can mislead. When you run real data, try role, years of professional experience, country and organization size. Always print the sample size next to each share, and expect wide intervals once a group falls below a few hundred answers. Choose your segments before you run anything, and write the list down. Role, experience band, organization size and region are defensible splits because a buyer can act on them. A dozen arbitrary cuts, each run until one shows a dramatic gap, produce a story that will not replicate in the next edition.

## Steps 10 and 11: Test Differences and Reweight Carefully

### Step 10: Test whether two groups really differ

Overlapping intervals suggest no difference, but a direct test settles it. A two-proportion z-test asks whether two shares come from the same underlying rate. It also works for the same tool across two editions, as long as the question stayed comparable.

``` python
import math

def two_prop_z(k1, n1, k2, n2):
    p1, p2 = k1 / n1, k2 / n2
    pooled = (k1 + k2) / (n1 + n2)
    se = math.sqrt(pooled * (1 - pooled) * (1 / n1 + 1 / n2))
    z = (p2 - p1) / se
    p_value = math.erfc(abs(z) / math.sqrt(2))
    return {"diff_points": (p2 - p1) * 100, "z": z, "p_value": p_value}
```

Compare Cursor among learners with Cursor among professionals:

``` python
python -c "from compare import two_prop_z; print(two_prop_z(107, 939, 885, 3781))"
{'diff_points': 12.011405043827963, 'z': 8.085505158662562, 'p_value': 6.190705773286742e-16}
```

A gap this large is decisive in this synthetic file. A p-value near zero says the gap is not sampling noise. It says nothing about why the groups differ, and it assumes independent respondents, which a self-selected survey only approximates. Run the test only for comparisons you planned in advance. Testing every segment pair until something lights up guarantees false positives.

If you do need many comparisons, say five roles across three regions, divide your significance threshold by the number of tests (the Bonferroni correction). With 15 tests and a 0.05 threshold, a result needs a p-value below 0.05 divided by 15 to count. The rule is crude and conservative, which suits a public report better than an exploratory notebook. Also keep effect size in view: with 30,000 respondents, a 0.8-point difference can be statistically solid and still too small to matter to a buyer.

### Step 11: Reweight with post-stratification, and hedge it

If you know the real mix of your target population, for example 50% professionals, 30% learners and 20% hobbyists, you can reweight answered rows to match it. Weighting fixes composition, not self-selection, so present the result as a sensitivity check beside the raw shares.

Add this function to the bottom of `shares.py`:

```
def (df, flags, col, targets):
    """Reweight answered rows so `col` groups match target shares (dict value -> share)."""
    f = flags[flags["answered"]]
    g = df.loc[f.index, col]
    seen = g.value_counts(normalize=True)
    w = g.map(lambda v: targets.get(v, 0.0) / seen[v])
    names = [c for c in f.columns if c != "answered"]
    return {n: float((f[n] * w).sum() / w.sum()) for n in names}
python
python - <<'PY'
from load import load_survey
from shares import tool_flags, poststratify
df = load_survey("data/demo_2026.csv")
f = tool_flags(df, ["AIToolCurrently Using"])
targets = {"I am a developer by profession": 0.5,
           "I am learning to code": 0.3,
           "I code as a hobby": 0.2}
print(poststratify(df, f, "MainBranch", targets))
PY
{'Cursor': 0.1700989534719307, 'GitHub Copilot': 0.45113563912084}
```

Shifting weight toward learners lowers both the Cursor and the Copilot share, yet the ranking holds, which is the useful result. When reweighting flips a ranking, report that instability prominently. The targets above are placeholders. Any real set of targets needs a cited source for the population mix. Weighted shares also need weighted intervals, which the Wilson function above does not provide, so report weighted numbers as point estimates and say so.

## Step 12: Wire It Together, Report and Test

### Step 12: Build the command-line runner, the report and the tests

The runner loads the file, builds the flags, writes a CSV of shares and a Markdown report that carries the file checksum.

``` python
from datetime import date
from load import sha256

def write_report(path, csv_path, columns, shares, overlap, segments, segment_col):
    lines = [
        f"# Tool share report ({date.today().isoformat()})",
        "",
        f"- source file: `{csv_path}`",
        f"- sha256: `{sha256(csv_path)}`",
        f"- columns used: {', '.join(columns)}",
        "",
        "## Share of respondents who answered",
        shares.round(4).to_markdown(index=False),
        "",
        "## Overlap",
        overlap.round(4).to_markdown(index=False),
    ]
    if segments is not None and len(segments):
        lines += ["", f"## By {segment_col}", segments.round(4).to_markdown(index=False)]
    open(path, "w").write("\n".join(lines) + "\n")
python
import argparse
from pathlib import Path
from load import load_survey
from shares import tool_flags, share_table
from overlap import overlap_table
from segments import by_segment
from report import write_report

ap = argparse.ArgumentParser()
ap.add_argument("csv")
ap.add_argument("--col", action="append", required=True, help="tool column (repeatable)")
ap.add_argument("--segment", help="column to split by")
ap.add_argument("--out", default="out")
a = ap.parse_args()

df = load_survey(a.csv)
flags = tool_flags(df, a.col)
shares = share_table(flags, len(df))
overlap = overlap_table(flags)
seg = by_segment(df, flags, a.segment) if a.segment else None

out = Path(a.out)
out.mkdir(exist_ok=True)
shares.to_csv(out / "shares.csv", index=False)
write_report(out / "report.md", a.csv, a.col, shares, overlap, seg, a.segment)
print(shares.round(4).to_string(index=False))
print(overlap.round(4).to_string(index=False))
if seg is not None:
    print(seg.round(4).to_string(index=False))
```

Add four tests. They pin the behavior you most need to protect: look-alike names do not count, the denominator is answered rows, the Wilson bounds are sane, and the z-test notices a real gap.

``` python
import sys, pathlib
sys.path.insert(0, str(pathlib.Path(__file__).parents[1]))
import pandas as pd
from shares import wilson, tool_flags, share_table
from compare import two_prop_z

def frame():
    return pd.DataFrame({"q": [
        "Cursor;GitHub Copilot", "GitHub Copilot", "Microsoft Copilot", None, "Cursor",
    ]})

def test_lookalike_not_counted():
    f = tool_flags(frame(), ["q"])
    assert f["GitHub Copilot"].sum() == 2
    assert f["Cursor"].sum() == 2

def test_denominator_is_answered_rows():
    f = tool_flags(frame(), ["q"])
    t = share_table(f, total_rows=5).set_index("tool")
    assert t.loc["Cursor", "answered"] == 4
    assert abs(t.loc["Cursor", "share_answered"] - 0.5) < 1e-9
    assert abs(t.loc["Cursor", "share_all_rows"] - 0.4) < 1e-9

def test_wilson_bounds():
    lo, hi = wilson(50, 100)
    assert 0.40 < lo < 0.41 and 0.59 < hi < 0.60
    assert wilson(0, 0)[0] != wilson(0, 0)[0]

def test_z_test_detects_gap():
    r = two_prop_z(100, 1000, 150, 1000)
    assert r["p_value"] < 0.01
python -m pytest -v
tests/test_shares.py::test_lookalike_not_counted PASSED                  [ 25%]
tests/test_shares.py::test_denominator_is_answered_rows PASSED           [ 50%]
tests/test_shares.py::test_wilson_bounds PASSED                          [ 75%]
tests/test_shares.py::test_z_test_detects_gap PASSED                     [100%]
============================== 4 passed in 0.35s ===============================
```

The runner takes its column names from the command line on purpose. Hard-coding them would break the first time an edition renames a header, and a command line argument leaves a visible record in your shell history and your commit message. The report module writes the checksum first because a number without provenance is the weakest kind of claim, and `to_markdown` keeps the tables ready to paste into a document.

Open `out/report.md`. It collects the share, overlap and segment tables in one file. Commit that file next to the code, and anyone can reproduce your numbers from the same download.

## Reading Survey Share Next to Seats, Revenue and Pricing

A survey share answers one question: what fraction of respondents who answered say they use a tool. Buyers usually ask something else. The table maps common questions to the measure that can answer them.

| Question | Best measure | What the survey CSV adds | Main blind spot | 
|---|---|---|---|
| Which tool do developers say they use? | Survey share (this pipeline) | Direct answer with an interval | Self-selected respondents | 
| Which tool do companies pay for? | Paid seats and invoices | Nothing directly | Bundled access, such as Copilot in GitHub Enterprise | 
| Which vendor earns more? | Reported revenue | Nothing directly | Revenue says little about reach | 
| Which tool performs better on my code? | A task benchmark | Nothing directly | Needs your own repositories | 
| Is use growing? | Same question across editions | Trend, if wording held steady | Question changes break the series | 
| Who uses it? | Segment shares | Role, experience, region | Small groups give wide intervals | 

Fresh product news does not change a survey that was fielded earlier. A third-party [Copilot plan and limits breakdown](https://www.developersdigest.tech/rate-limits/copilot) lists Free, Pro, Pro+, Max, Business and Enterprise tiers, plus the Standalone option, and the product moved into agentic work with cloud sandboxes billed from November 2026. Our coverage of [Copilot’s agent push with Fable 5.2 and Carbon](https://shattered.io/github-copilot-agentic-coding-carbon-fable-5-2-pro-plus-39-max-100-2026/) tracks that shift. GitHub also announced that Claude Fable 5, Claude Haiku 4.5, Gemini 3.8 Flash, Gemini 4 Argon, Grok 4.6 and Kimi K3 are scheduled to be deprecated across Copilot on December 14, 2026. That change is planned and has not taken effect yet. A survey fielded before such changes cannot see them, so date every conclusion.

Model lineups move even faster than product plans. The [GitHub Copilot vs Cursor model race](https://shattered.io/github-copilot-vs-cursor-4-models-8-days-2026/) shows how fast model lists change, which is a good reason to ask “tool” questions, not “model” questions, when you compare survey shares. Tool names stay stable across editions while model names churn monthly. Browse the [software and developer tools hub](https://shattered.io/category/software/) for more coverage of editors, assistants and IDEs.

## Common Pitfalls That Skew Cursor vs GitHub Copilot Numbers

Most bad survey numbers come from a handful of mistakes. Check each before you publish.

- **Mixing denominators.** Stack Overflow’s own 2025 sentence pairs 18% for Cursor with 68% for Copilot among people using out-of-the-box AI assistance. Different groups sit under each number. Always state the group and keep it identical for both tools.
- **Adding multi-select shares.** Respondents tick several boxes, so shares often sum past 100%. That is correct. Never normalize them to 100%.
- **Counting look-alike names.** “Copilot” also appears as Microsoft Copilot. Exact matching plus the`tokens_seen` audit from Step 5 catches this.
- **Reading a skipped question as “no”.** A blank means no answer. Counting blanks as non-users deflates both shares.
- **Comparing editions without checking the question.** If wording, answer lists or the screening logic changed, the trend line is fiction. Read both questionnaires first.
- **Treating survey share as market share.** The survey cannot see seats, revenue or bundled licenses. Say “share of respondents”, never “market share”, in a headline.
- **Trusting tiny segments.** A 40-person group can swing 15 points on noise. Enforce`min_n` and print every sample size.
- **Confusing “used” with “wanted”.** Many surveys ask both. A tool with high wanted share and low used share is a different story from the reverse.
- **Ignoring the time window.** “Used in the past year” and “use today” are different claims. A developer who tried Cursor in March and returned to another editor by June still counts in the first.
- **Averaging across segments by hand.** Mixing group shares without the group sizes can reverse a conclusion, a trap known as Simpson’s paradox. Compute the combined share from the raw counts, never from the segment percentages.
- **Dropping the checksum.** Without a file fingerprint, nobody can tell whether a number came from the original download or a cleaned copy.

## Troubleshooting: 11 Failures and Their Fixes

1. **`KeyError` on the column name.** The header differs from what you typed. Copy the name from the`discover.py` output, including spaces and capitals. The failed run on a mistyped name ends with`KeyError: 'AIToolCurrentlyUsing'` .
2. **`discover.py` finds nothing.** You may have the schema file or an edition that does not list the tools. Confirm that the CSV is the responses file and check the answer lists for your edition.
3. **Copilot count looks too high.** Look at`tokens_seen` . If Microsoft Copilot or another look-alike appears, tighten the pattern in`tools.py` to exact names.
4. **`ImportError: Missing optional dependency 'tabulate'` .**`to_markdown` needs the package. Run`pip install tabulate` , and keep it in`requirements.txt` .
5. **`UnicodeDecodeError` while loading.** Retry with`encoding="utf-8-sig"` in`read_csv` . Some exports carry a byte-order mark.
6. **Shares sum past 100%.** Expected for multi-select questions. Report each tool on its own.
7. **Segment table comes back empty.** Either the segment column name is wrong or every group is below`min_n` . Print`df[segment_col].value_counts()` to check.
8. **Slow load or memory pressure.** Pass`usecols=[...]` to`read_csv` with only the columns you need. Wide survey files carry hundreds of columns you will never touch.
9. **Your percentages differ from the published page.** The site may use a different denominator, a filtered subgroup such as professional developers, or a different edition. Reproduce its filter first, then compare.
10. **`pytest` cannot import`shares` .** Run`python -m pytest` from the project root, and keep the`sys.path.insert` line at the top of the test file.
11. **`pandas` upgrades change output.** You installed without the pin. Reinstall with`pip install -r requirements.txt` and compare against the saved report.

## Advanced Tips for Stronger Survey Analysis

**Bound the non-response problem.** You cannot know what the respondents who skipped the question would have said, but you can bracket it. Assume none of them use the tool for a floor, and all of them for a ceiling.

``` python
def nonresponse_bounds(k, n_answered, n_all):
    """Worst cases: no skipper uses the tool, or every skipper does."""
    return k / n_all, (k + (n_all - n_answered)) / n_all
```

On the demo, the Cursor range and the Copilot range never touch, because the Copilot floor sits above the Cursor ceiling. That makes “Copilot is more widely used among respondents” hold under any pattern of non-response. A narrower gap would not survive this test, and you should say so when it fails.

**Bootstrap when the design is unusual.** If you cluster by country or employer, resample at the cluster level with NumPy and take the 2.5th and 97.5th percentiles of the share. It costs a few lines and removes the independence assumption that Wilson intervals make.

**Cache a clean frame.** After the first load, write the flags to Parquet. Repeated runs then skip the text parsing.

**Automate editions.** When a new edition appears, rerun the pipeline on it with the same command line and diff the two `report.md` files. A scheduled job, like the one in the [Cursor CLI GitHub Actions workflow](https://shattered.io/cursor-cli-github-actions-headless-agent-2026/), can do this without a human in the loop, but a person should read the question changes before trusting the trend.

**Add the “wanted” column.** If the edition pairs “used” with “want to use”, compute the retention ratio of respondents who both used and want to keep using a tool, divided by those who used it. It tells you whether usage is sticky, which raw shares cannot.

**Triangulate with other evidence.** Place the survey result beside seat data from your own company, a task benchmark on your repositories and the vendor’s published plan details. When three imperfect measures agree, you can act. When they disagree, the disagreement itself shows which assumption to examine, and that is more useful than any single number.

**Log the denominators.** Print the answered and total counts in every table title. It takes one f-string, and it prevents the Step 6 mistake from creeping back in months later.

## The Complete Project and Final Run

The finished repository has eleven small files and no dependencies beyond pandas, pytest and tabulate.

```
survey-share/
  requirements.txt     pandas==3.1.1, pytest, tabulate
  make_demo_data.py    synthetic file with planted shares
  load.py              CSV loader and SHA-256
  tools.py             exact tool patterns and look-alike audit
  discover.py          finds tool columns by searching values
  shares.py            flags, Wilson intervals, post-stratification
  overlap.py           both / only / neither split
  segments.py          shares by group with min_n guard
  compare.py           two-proportion z-test
  bounds.py            non-response bounds
  report.py            Markdown report with checksum
  run.py               command-line runner
  tests/test_shares.py four guard tests
```

A real run on your downloaded edition uses the column names you recorded in Step 5:

```
python run.py data/survey_2026.csv \
  --col "YOUR TOOL COLUMN" \
  --segment "YOUR ROLE COLUMN" \
  --out out
python -m pytest -q
```

When the run finishes, open `out/report.md`, read the denominators, check the `tokens_seen` audit once more and only then quote a number. State the edition, the column, the denominator and the interval every time.

## Frequently Asked Questions

### Where does Stack Overflow publish the raw Developer Survey data?

The survey site links a download for each edition, and the 2026 page points to the StackExchange Survey repository on GitHub. Follow the link on the edition’s results page. File names change between editions, so rename yours and record the checksum.

### Is a survey share the same as market share for Cursor and GitHub Copilot?

No. A survey share measures what self-selected respondents say they use. Market share would count seats, revenue or active installs across the whole population. The survey cannot see bundled licenses, such as Copilot included with GitHub Enterprise since October 28, 2026.

### Why compute Cursor vs GitHub Copilot myself instead of reading the survey page?

Published figures often use a specific denominator or subgroup, and the 2025 sentence quoted at the top shows two groups under two numbers. Computing from the CSV lets you pick one denominator, add intervals and slice by role.

### Which pandas and Python versions does this pipeline need?

It was run on pandas 3.1.1. Python.org lists 3.15.2 as the latest version, and the 3.16 alpha is not recommended for production work.

### How big must a segment be before I trust its share?

There is no universal cutoff. The default `min_n` of 100 drops the smallest groups, but even 100 answers give an interval about 10 points wide near 50%. Read the interval, not just the count.

### Can I use the same code for Claude Code, Windsurf or Codex?

Yes. Add a pattern to `TOOLS` in `tools.py`, rerun `discover.py` to confirm the column and token, and the flags, overlap and segment code adapt without edits. Write the exact product name as the survey prints it.

### Does the survey cover agent tools as well as editors?

It depends on the edition. Stack Overflow’s 2026 press release reports 26.2% of respondents using automated agent workflows, so agent use is at least a category in that edition. Whether a product such as Cursor’s cloud agents or Copilot’s cloud sandboxes has its own answer option is something only the questionnaire and the discovery step can tell you.

### How often should I rerun the analysis?

Rerun it when a new edition appears and when you change the tool patterns. The survey runs once a year, so the schedule is slow, while the products move monthly. Between editions, lean on your own measurements for current behavior and treat the survey as the annual baseline.

### Do the demo numbers tell me anything about real developers?

No. The demo file is synthetic with planted rates, built only to prove that the pipeline recovers known answers. Real conclusions need the real CSV.
