If you are a nerd, then as far as fictional media are concerned, you have never gotten laid, very likely haven't gotten to first base, may have never ever stepped up to bat — and quite possibly have never so much as wandered within a mile of the ballpark.
Now, this does have some real life basis, in that some nerds and geeks do lack some social skills, and take up unusual interests as a way to fill the gap in their lives (or, more unfortunately, fail to develop social skills because of said interests). Or maybe they're just asexual.
This trope can apply to female nerds as easily as male nerds, but thanks to the Double Standard, the males are far more likely to find unwholesome outlets for their unexpressed sexuality, virginity notwithstanding. In fact, male nerds have just as much chance of being the Casanova Wannabe as any other type of male character. Some males (and a rare female or two) may try to deny their virginity, out of fear of losing face, but thanks to their nerdy exteriors, they are unlikely to be believed by other characters, if they even have the social graces to spin a convincing lie in the first place. Another possible reason that female nerds are less likely to be virgins is because All Men Are Perverts in Fiction Land, and couldn't care less about what a woman's hobbies are as long as she's letting him have sex with her (he may even be too busy staring at her chest to even know what her hobbies are), while women are often depicted as far more discriminating and will reject a partner whose hobbies aren't "cool" enough. Hence the use of terms like "girl repellent" (or the less G-Rated version "pussy repellent") to describe nerdy things.
There is also a general perception that a nerd's level of nerdiness is inversely proportionate to their chances of losing their virginity, which is a big reason that Even Nerds Have Standards. It also means that some nerds will deny at least some aspects of their nerdiness. The reverse belief also exists. Instead of believing that nerdy hobbies prevent you from having sex, some people believe that the inability to get sex (or do other "normal" social activities) is the only reason people take up nerdy hobbies in the first place. Basically, "all nerds are virgins because only a socially inept loser would ever waste their time on this crap when they could be out clubbing, partying, or having sex instead".
In non-mainstream works, this trope shows up less frequently, although some cases are deliberate aversions and some are just Author Appeal.
If the nerds are the main characters, there is a high chance they won't be virgins by the end of the movie/book/first season of the show, because virginity is a tragic flaw and heroes always overcome their flaws. Make that a very, very high chance if said heroesare male.
Note this doesn't prevent a Nerdgasm.
Compare You Need to Get Laid.
Contrast Nerds Are Sexy.
Examples:
open/close all folders
Anime and Manga
Averted in the manga Black Lagoon, Benny the ship's tech is the only one shown to have a sex life and he got the girl he got because of his hacking skills. The other characters probably aren't virgins, though.
In Steins Gate, Okabe and Kurisu spend a great deal of time mocking each other for being scrawny, nerdy virgins - naturally ignoring their own scrawny, nerdy virgin-hood.
Revenge of the Nerds plays with this in varying degrees. Clearly some of the nerds are out of their depth sexually, but Gilbert seems fine at attracting nerdy girls, Lewis comes off as a sexual maestro, and Booger clearly has enough experience to take seriously an illegitimate child scare in the fourth movie.
The Forty Year Old Virgin: The virgin protagonist collects fantasy (comic book style) toys, and has a good understanding of technology; this doesn't necessarily imply 'geek' therefore 'virgin' but it is consistent with that view. But the film is also a deconstruction of Sex as Rite-of-Passage, so it's probably a subversion.
The Big Bang Theory averts this. Aside from Sheldon justifying it with his Asexuality, no one else in the group is a virgin, even if Raj has trouble with women (as a result of a personality issue completely unrelated to being a nerd, and it didn't stop him from sleeping with at least two girls in the series).
Similarly, 30 Rock's Liz Lemon is not a virgin, but merely has a terrible sex life, partly due to her bad social skills and partly due to the fact that, aside from Floyd, all the men (and one woman) she has dated turned out to be either insane or wildly unsuitable in some way.
Supernatural: Sam has been body-swapped with a teenage boy and is looking through the kid's stuff. He finds a Star Wars T-shirt and comments, "Virgin."
Averted with Charlie, a semi-reccuring character who LAR Ps and loves Harry Potter, and is implied in her introduction to get some rather regularly. Also both brothers are both a little bit nerdy, Dean constantly dropping references and Sam being a former law student, and seem to have no trouble getting laid.
On The OC, Hollywood Nerd Seth is stated to be a virgin at the beginning of the series, but it doesn't stay that way.
Of course, so are Summer and Marissa.
Averted in Bones, where the show's extensive and exotic galery of nerds and geeks all do have sex, most of the times satisfacory and often perverse (and do they brag about it!).
Played with in the case of Zach Addy, whom everyone initially assumes is a virgin. He tells them quite frankly that he has, and does, in fact, have sex. At one point, he asks the psychologist Sweets why everyone thinks/assumes he is a virgin.
Toby Isaacs, one of the few people in Degrassi Community School history to graduate as a virgin. This trope was averted with Liberty, however.
Seinfeld inverts the trope and implies Virgins are Nerds. When men don't have sex, or stop having sex for a significant amount of time, the 99% of their brains that are always thinking about sex will start to function normally and boost their intelligence and thirst for knowledge significantly (George, for example, becomes an Omnidisciplinary Scientist and learns Portugese in a matter of days). Women however, can get sex so easily they take it for granted to the point where they require it to function normally, and during a dry spell start to act like someone who hasn't had their morning coffee.
Averted in Crime Scene Investigation, when the Hollywood Homely assistant coroner displays some particularly nerdy knowledge and Nick quips "you need a girlfriend, man." The coroner replies "I'm engaged".
Subverted in Clueless: the main characters were doing a school assignment with a nerdy girl who kept throwing up. At first they assumed she had an eating disorder; it turns out she was actually pregnant. The baby's father was another nerdy guy.
Late Night With Conan O'Brien made this joke a lot. It went so far that, one year, at Comic Con Triumph The Insult Comic Dog went around interviewing the attendees and seeing how much they really knew about sex, including Triumph holding a picture of a vagina and asking the men in attendance to identify it. No one did.
Averted with most of the TGWTG crew though. Doug Walker is married, his brother is engaged, and Linkara, Spoony, and Lindsay have all been in long term relationships.
Several Copy Pasta stories involve the poster bringing a girl who is very much into him back to his place only for her to see his nerdy interests and walk out.
In one of these stories, the girl worked at the comic shop the poster frequented, where she sold him most of the nerdy stuff. Somehow things didn't click for her until she got back to his place.
(Increasingly amused) "... there's a moral choice aspect where you answer questions based on your own substantial experience with relationships *stifled laughter* "
And the accompanying visual is of a fat glasses-wearing guy sitting next to a blow-up doll.
The Cleveland Show: Cleveland takes Jnr to a sci-fi convention, to show him what happens to guys that fail to lose their virginity. They ended up coming home with heaps of stuff from it.
Another example from this show involves a cutaway gag about finding a rapist at a Star Trek convention. The police ask the crowd to raise their hands if they are not a virgin. The only person who does so is told he is under arrest.
The Star Trek episode of Futurama mentions that in Earth's past, Trekkies, after the show became a worldwide religion, were executed by being thrown into a volcano because it was "the manner best befitting virgins." Considering how many of the show's staff are themselves Trekkies, nerds or holders of advanced degrees there was a definite Take That, Us vibe to the scene.
The Comic Book Guy in The Simpsons lost his virginity to Agnes Skinner when he was in his forties. Principal Skinner, who is pretty square himself, apparently lost his to Mrs. Krabappel when he was in his early 40s.
One bit on Robot Chicken has the Devil wondering what happened when everything in the underworld suddenly turns frigid as he's torturing victims. Cut to a bedroom with a hot blonde lying in bed and a nerd dancing around the room singing "I got laid! I got laid!"
Like its Seth MacFarlane companions, American Dad has this in effect with Steve, Barry, Snots, and Toshi. Many episodes have a subplot involving either Steve or Steve and his friends trying to overcome their nerdiness and get some.
Real Life
A survey showed that students at elite US colleges were far more likely to be virgins than the population at large (e.g., Harvard 41% were virgins, Princeton 44% and MIT 49%, versus 13% of college students at large.) Even 35% of grad students at MIT were still virgins! You could also find similar results by breaking it down by majors with high and low GRE scores for Wellesley students: "0% of studio art majors were virgins, but 72% of biology majors were virgins, and 83% of biochem and math majors were virgins!". The page also notes that this doesn't seemed to be entirely explained by the common rational of this being completely involuntary (though that seems to explain part of it) as MIT students (particularly the female ones) were also much less likely to have A Date with Rosie Palms than the population at large.
The etymology of the word bachelor also seems to bear this trope out: since most people in university or apprenticeship programs were/are young, single and their studies did not grant much time nor resources to actively court someone, the term (which had it's school-based definition first) slowly became a synonym for any single male. In other words, they were too busy studying to date.
Also, the oldest English-language universities were ecclesiastical colleges and (even after they became Protestant, and the clergy were allowed to have wives) the dons were expected to have a somewhat monastic lifestyle... enforced by the fact that, while they worked in the university at least, they weren't paid enough to support a wife and family.
In most countries until about 200 years ago, to be in university at all men were usually expected to be in or working towards holy orders. Obviously, in Catholic universities that also meant celibacy.
This is much less true when it's Nerd On Nerd, especially now that the Internet makes us less isolated from each other. Many conventions are notorious for some people attempting to make the Free-Love Future a reality one hotel room at a time...