Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 158 Stack Exchange communities.

What is meta?
Here's how it works:
  1. Any Stack Exchange user can ask a question
  2. The community provides support, votes on ideas, and reports bugs
  3. Your voice helps shape the way Stack Exchange operates

Update: I decided to rerun the script since we now have about twice as many users. The distribution trend is much more pronounced in this version. Though the following text is from the original version of this post, the data and graph are new.

Update: Here is a StackExchange Data Explorer query

Since I was curious about the average age of the users here, I decided to write a script to answer the question in the vein of Grant's profile scraper. The script downloaded the profile page of every user and cataloged the age for each person that chose to provide it. The script then printed out the aggregate data.


use strict;
use warnings;

use LWP::Simple;

my $MAX_USER_ID = 15_000;

my %Ages;

$| = 1;  # print immediately

print "Fetching...";
for my $uid (1..$MAX_USER_ID)
    my $page = get "$uid";
    next unless $page;

    $Ages{$1}++ if $page =~ m/Age\s*<\/td>\s*<td>\s*(\d+)\s*<\/td>/;
    print "$uid..." if $uid % 10 == 0;
print "\nDone.\n";

for my $age (sort keys %Ages)
    print "$age: $Ages{$age}\n";

The output is as follows:

8: 13
9: 3
11: 3
12: 1
15: 2
16: 14
17: 8
18: 21
19: 49
20: 58
21: 91
22: 118
23: 173
24: 221
25: 255
26: 284
27: 276
28: 289
29: 225
30: 224
31: 212
32: 167
33: 164
34: 142
35: 112
36: 123
37: 111
38: 121
39: 78
40: 65
41: 60
42: 36
43: 30
44: 23
45: 30
46: 20
47: 12
48: 9
49: 12
50: 8
51: 10
52: 3
53: 2
54: 4
55: 3
56: 1
58: 4
60: 1
61: 3
63: 1
66: 1
68: 1
88: 12

The average age of a Stack Overflow user is 30.1, assuming everyone is honest in their profile (though we do have more 8-year-olds than I would have expected). Finally, here is a graph showing the distribution more clearly. That outlier to the right are our eight 88-year-olds still going strong. If we remove the 8 and 88-year-olds from the average, it drops us down by 0.1 years to 30.0. (Actually, it's a drop of 0.104.)

Alt text

share|improve this question

migrated from Jul 27 '09 at 1:15

This question came from our site for professional and enthusiast programmers.

I guess the 88 year olds are folks trying out that validation problem the site had earlier. Not quite sure where all those under-teens are coming from, though. :-) – robsoft Sep 8 '08 at 16:31
I avoid entering my birth date into any site. It is too value to identity thieves. – Chris Noe Sep 27 '08 at 22:23
Why use curl? You don't like LWP::Simple or you like forking 5300 times? :) – brian d foy Oct 8 '08 at 6:49
Is StackOverflow using the new WCF Data Services ? – ControlBreak Oct 8 '08 at 7:04
I used curl because I didn't know of any other way to do what I needed. I'm not familiar with LWP::Simple, but I'll look into it in the future. Besides, I'm pretty sure the bottleneck was the bandwidth and not the fork. :) – Kyle Cronin Oct 8 '08 at 12:31
More detailed analysis, including reputation and membership length is now available here:… – Oddthinking Oct 24 '08 at 2:45
8, and 88. In the year 2008. – Svante Nov 29 '08 at 11:59
I'm impressed, Schwern. I've decided to run your updated script overnight to produce some new data and a graph. Hopefully they should be up sometime tomorrow. – Kyle Cronin Jan 12 '09 at 6:41
Is that a poisson distribution? – wheresrhys Dec 21 '09 at 20:48
Would anyone be willing to update this with 2010 data? – Marek Jul 14 '10 at 6:23
Not many 11 year olds I know on it but me:) – Benny Jan 23 '11 at 1:10
Not a single 13 year old, shame I turned 14 a week ago!!! – Russell Dec 23 '11 at 21:41
Given the shape of the age distribution (not symmetric, tailing to the right), it might make sense to compute the median age in addition to or instead of the average. – Peter Mortensen Jan 5 '13 at 17:50
Is it okay to bump this question in hope for newer, updated data? – ffledgling Nov 30 '13 at 12:15
As of Febuary 17th 2014, 2479910 users out of 2819800 have a null value for their age...that's about 88% of users who did not enter their birthdate. I'm only getting started with the data explorer and stats in general but can we really draw a reliable portrait of the community with those numbers? – Emilie Feb 17 '14 at 6:18

24 Answers 24

Cool. Now let's see a distribution of reputation by age...

share|improve this answer
Well why don't you go and do that, I'll be waiting. – Brad Gilbert Sep 16 '08 at 14:25
It's too bad you can't upvote comments on answers. – eyelidlessness Oct 12 '08 at 18:24
Wait no longer.… – Oddthinking Oct 24 '08 at 2:44

I always think of Mark Twain when I see things like this:

There are three kinds of lies: lies, damned lies and statistics.

share|improve this answer
One of the greatest quotes (and ideas) ever!!! – Jason Bunting Oct 10 '08 at 21:30
Wasn't it Disraeli who said that? – Dan Dyer Dec 16 '08 at 0:35
@Dan He was lying when he said it. – Schwern Jan 12 '09 at 6:51
Lies, damned lies, and statistics (Wikipedia): "The term was popularised in the United States by Mark Twain (among others), who attributed it to the 19th-century British Prime Minister Benjamin Disraeli (1804–1881): "There are three kinds of lies: lies, damned lies, and statistics." However, the phrase is not found in any of Disraeli's works and the earliest known appearances were years after his death. Other coiners have therefore been proposed, and the phrase is often attributed to Twain himself." – Peter Mortensen Dec 16 '12 at 13:00

I was impressed by this, so I have taken it further, to include reputation and membership length:

share|improve this answer
This is pretty cool. Can you rerun it? – kenwarner Jul 31 '09 at 15:31
Excellent! Please carry on! – Gayot Fow Aug 5 '13 at 11:15

Eight and 9 year olds seem unlikely, but the 11's and 12's could be real. Jeff & co probably should look into this: Child Online Privacy Protection Act and take appropriate action.

share|improve this answer
According to that site, this only applies if "you operate a commercial Web site or an online service directed to children under 13." – David Schmitt Sep 8 '08 at 18:19
no, it also applies to a general interest website where you have knowledge that children under 13 are users. Knowledge could come from profiles being filled out – Will M Sep 8 '08 at 18:36
to be more specific - knowledge that you're collecting info from kids (not just that they are users), but same point – Will M Sep 8 '08 at 18:41
If this 12 year old can invent a 3D Solar Cell capable of collecting 500 times the energy of flat solar panels and is studying nano-technology, they are very likely on Stack Overflow:… – Gordon Bell Oct 3 '08 at 15:11
COPPA? It is copper! No really, this COPPA thing is really annoying and unnecessary. At least, I always get frustrated when I get asked this, because it is USA-only. – hangy Oct 20 '08 at 9:04
USA != the rest of the world. I realise the "service" is being supplied in America, but even so... And at 8 I was happily taking apart BASIC programs on the Dragon 32, so if there had been an interweb I'd have been on it... – Paul Hargreaves Oct 30 '08 at 15:13
@Gordon Bell, You really need to fact check when reading "claims" like that. He didn't invent a 3d solar cell, they have been around for over a decade. The image of his "solar cell" on his poster board is taken for another paper written 5 years ago. – mmcdole Dec 6 '08 at 17:11
Hey, I'm 12! I started using SO when I was 11, and I'm telling the truth (I started doing VB6 when i was 7)! Don't be so suspicious, although I doubt that some of the people who say they are 8 here are rly 8... ;) – Maxim Zaslavsky Sep 19 '09 at 4:19

Since there's no value in entering a valid age, I imagine many of the ages are invalid. And there's been a lot of validating the birthdate field performed by users.

share|improve this answer
What a cynical view of humanity .. ;) – Bobby Jack Oct 13 '08 at 13:25
Bobby: Cynical would be "Age on the internet is meaningless, therefore just put anything down that passes the bots". (ie, I'm usually about 22 or older, these days). – Arafangion Apr 9 '09 at 1:30

For the 88 year old, when I try to set my birthdate to 1919, it shows this:

There were errors when updating your profile

* Birthday must be after 1920/01/01

When I tried to set it to 2020, it shows this:

There were errors when updating your profile

* Birthday must be before 2000/12/06

The two edge cases make sense to me.

share|improve this answer
Wait, we're not allowed to have any 90 year old programmers on here? I agree that it's unlikely, but not entirely out of the question. – Brian Campbell Apr 19 '09 at 16:27
You dug up this post from a while ago. It is an interesting approach. – BenMaddox Apr 19 '09 at 18:23
Minimum birth year allowed should be 1900 or so, 1920 is a too high number. – Konamiman Dec 9 '09 at 16:03

88 year olds are most likely false as well since I think that is the max allowable age.

share|improve this answer

Damn, I feel (relatively) old now.

share|improve this answer

All the 8-year-olds must be people that have "2000-01-01" as default date of birth.

share|improve this answer
Makes me wonder about the 9 year olds then ;) – Marshall Sep 8 '08 at 17:59
True :) Must be 01-01-01 – Espo Sep 8 '08 at 18:00
if 01-01-01 gets an age of 9 you should file a bugreport – korro Nov 4 '08 at 20:30

What's interesting is what the data possibly reflects. I mean does the curve reflect the "prime-time" portion of a programmer's career?

share|improve this answer
Probably only the fact that programmers in this age range at this time are likely to be more involved in something like this. I expect the graph would shift a bit left as more college students start using it.. and spread right as we grow older ;) – Mostlyharmless Sep 17 '08 at 20:55
This is what you would call a self-selected sample. You can't really draw any conclusions about the population in general unless it's a random sampling. – Adam Lassek Sep 24 '08 at 16:28

Can those of us to the right of the bell have a Veterans Badge (or Old Gits)?

*** Edit: I'm gobsmacked why someome would vote this down. Really starting to wonder about the reputation system of SO - great idea, but in practice rep has nothing to do with expertise if people downmark (or upmark) threads like this what does it really say?

share|improve this answer
And since badges aren't taken away, then all you'd do to get it is change your age, grab the badge, and change it back. Some people live for badges... – Adam Davis Sep 8 '08 at 17:52
we don't need no steenkin' badges -- Blazing Saddles – Steven A. Lowe Sep 19 '08 at 4:06
I'd prefer to be called an "Old Subversive" – Brent.Longborough Sep 20 '08 at 15:52
Greg: Old gits are those who use Linus's version control system... – Arafangion Apr 9 '09 at 1:33

At 29 you begin to stop looking for answers. Is that because you now have the answers, or because you no longer care?

share|improve this answer
Or because you realize that "looking for answers" is a flawed concept? – bzlm Oct 1 '08 at 10:22

I'd be more interested in "When did you start programming?" instead of age.

I started programming 30 years ago, but I'm not interested in putting my age on my profile. Sadly, age discrimination is a factor in this industry...

share|improve this answer
In both directions! No matter what my experience (years && languages) in development I still get the typical "well, you're doing well for yourself aren't you, you know, for your age and all" when I talk to other consultants or recruitment specialists... – Pat Sep 23 '08 at 7:03

I wrote up a version that uses random sampling over what appears to be the full range of UIDs at the time of this writing.


use strict;
use warnings;

use LWP::Simple;

my $MAX_USER_ID = 55_000;       # Maximum range of UIDs to search
my $MAX_HITS = 100;             # Maximum UIDs to randomly try
my $Count_No_Age_As_Hit = 1;

my %Ages;   # Store the age distribution

$| = 1;  # print immediately

print "Fetching $MAX_HITS users.\n";

my $hits = 0;
until( $hits >= $MAX_HITS ) {
    my $uid = int rand $MAX_USER_ID + 1;

    my $page = get "$uid";
    unless( $page) {
        warn "$uid not found.\n";

    if( $page =~ m/Age\s*<\/td>\s*<td>\s*(\d+)\s*<\/td>/ ) {
    else {
        $Ages{"no age given"}++;
        $hits++ if $Count_No_Age_As_Hit;

    print "#$hits $uid... ";
print "\nDone.\n";

for my $age (sort keys %Ages)
    print "$age: $Ages{$age}\n";

And the results of one run...

19: 1
20: 1
21: 1
23: 1
25: 2
26: 2
27: 3
28: 4
29: 3
32: 1
34: 1
36: 1
43: 1
44: 1
no age given: 77

From which the only responsible conclusion I can draw is that you can't draw a conclusion. Too many users don't specify an age.

share|improve this answer
Random sample does not mean a subset of a self selected sample. – Copas May 29 '09 at 1:45

Would be interesting to see the corresponding graph for Yahoo! Answers. Hah.

share|improve this answer
  • The gap between 66 and 88, woth 8 people with 88 years is quite strange! I think 1920 is the default year when signing up.
  • 8 years old? WOW!!
share|improve this answer

IMHO it would be much better for performance if you'd replace the call to curl with LWP::UserAgent. Interesting idea though.

share|improve this answer
You're right, escaping to the shell isn't the best for performance. However, with this particular script the bottleneck is the bandwidth and not the shell call. – Kyle Cronin Sep 8 '08 at 17:07
Doing tricks like this would change the bottleneck from bandwidth to the speed at which research can be done. (Much faster to just wack the script into the editor, than to research the best optimum way to do everything). – Arafangion Apr 9 '09 at 1:36

Damn, on a site like this I used to be one of those kids in the 13--18 range... now I'm all of 20 years old, but at least this graph lets me still feel like I'm on the young end. LOL, I guess I don't get to complain.

share|improve this answer
We all used to be in the 13-18 range, except that ones that are <= 18 now. ;-) – peSHIr Jan 12 '09 at 7:28

Graphs are only as good as the data going in!

8 & 88 should be discounted seeing there are a couple of very probably explanations.

On the other hand, I can't remember the last time I gave the right year as part of my profile - at least on a half dozen registrations, I'm well in to my 200s...


share|improve this answer

It's very interesting that the graph you display follows Normal Distribution, aka the The Bell Curve.

share|improve this answer
Actually, it is tailing to the right. – Peter Mortensen Jan 5 '13 at 17:52

Given the age distribution here, I'll have to keep my Frankie Goes to Hollywood references to a bare minimum.

share|improve this answer
Relax... The World could always use more FGTH references. – James Curran Oct 13 '08 at 16:35

Perhaps at a more advanced age you know all you need to know to maintain your Cobol and Fortran code, and you are not willing to learn yet another language or methodology. Or maybe people in my age group (47) have moved on to other positions e.g. management, sales etc.

share|improve this answer
or gotten tired of the rat race and started their own company – Steven A. Lowe Sep 19 '08 at 4:07

I've listed my birthday in my profile as the latest that the system will accept, purely to test the "Autobiographer" badge. 8 years of age is the youngest that the system will allow. Curiously, my question as to why this is so has vanished from the system entirely.

(No, I'm not 8; I just don't want to give my age.)

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .