Robin: It goes back to the day I was born. [...] He wanted a son, and the fact that I was a girl didn't change his plan.
Ted: What do you mean?
Robin: My full legal name is Robin Charles Scherbatsky Jr.
When the parents (or rarer, a sibling or other relative) want that their new infant will be male or female but end up with a daughter or son instead. This is sometimes a reason for being Raised as the Opposite Gender (or at least by raised tomboyish or effeminate), though more often it's just a case of the parents guessing incorrectly. Sometimes the parents name their baby a Gender-Blender Name if they chose only names for the opposite gender. In some extreme cases, the parents will ostracize their child because they were born a different sex than they wanted.
This is becoming a Dead Horse Trope because prenatal sex tests have become more and more common, though they're not 100% accurate and not everyone uses them. Wanting a male heir but getting a daughter instead often invokes Heir Club for Men. May also result in Gift-Giving Gaffe, as the parent may give the child presents suitable for the child they wanted rather than the child they have.
- There was once an advert for a paint company's painting machine where a man is narrating about his baby called "Sam". The room is blue in colour, but the machine gets filled with pink paint and the room gets repainted pink. The narrator then reveals that baby Sam was expected to be a boy, and they got a girl.
- A mild example happens in Wandering Son. When Nitori's older sister was born her grandparents had a bet on her sex. They thought she was male due to her loud screaming, but grandma ended up losing 10,000 yen in the end. The opposite occured with Nitori, though in hindsight Nitori's father wonders if it was wrong.
- Ranmaru Rindou from Binbō-gami ga! has a father who's a macho/badass martial artist who wanted a boy, but was born a girl instead, so she was Raised as the Opposite Gender. The result of this apart of being a tomboy (and having a resentment with his father), Ranmaru becomes a Japanese Delinquent and when she was transferred to the same school than Ichiko and Momiji, she becomes desirable for her schoolmates.
- The father of Oscar from Rose of Versailles wanted a boy (it was pre-Revolution France) so when his seventh child turned out to be another female, he gave her a Gender-Blender Name and Raised as the Opposite Gender. He's based on a historical character who did the same to his firstborn.
- Nagisa's mother in Assassination Classroom wanted a daughter so she could live vicariously through her and experience all the things she never got to, or failed to achieve. Invoking Dude Looks Like a Lady on Nagisa to pretend he's a girl as she tries to control and steer the course of his life.
- This is the focus of an epilogue chapter of Banana Fish, in regards to Akira, Ibe's niece. Akira's father wanted a son but ended up with a daughter. Akira is very much a tomboy who even has a Gender-Blender Name to boot. The epilogue that Akira appears in is about her visiting Eiji and Sing in New York 8 years after the end of the main series and discovering who Ash was. She comes to New York because her parents' relationship has turned sour, and she blames herself for it due to knowing her father wanted a son. It's also mentioned that she's started to menstruate, which isn't helping her gender issues either. Sing and Eiji manage to get her to embrace her femininity slightly by the end of her trip. Eiji brings up that he likes Akira's name because he knew someone with a name that meant the same thingnote . Akira ends up befriending Sing, and at one point jokingly says that next time they meet she'll be a hot woman. In the author's next series Yasha, it's heavily implied that Sing ended up marrying Akira when she was older.
- In the Marvel-published Conan the King comics, Conan's wife Zenobia displays some surprising martial skills that her original counterpart didn't have to prove she can accompany him in his adventures when he tells her to Stay in the Kitchen. When he asks how she learned to fight so well, she tells him that her father was an soldier and he always wanted a boy. Considering that she was an harem girl when they met each other, it makes one wonder how she became an slave in the first place.
- Preacher: Jacob O'Hare, a very manly man and his equally manly buddies are celebrating the imminent birth of his son at the local bar, when a particularly wimpy guy asks what he's going to do if it's a girl. After the requisite loud guffaws, the phone rings... and it turns out Jacob's wife died in childbirth and the baby's a girl. But on holding her he says "So you're a girl. That needn't be so bad." He proceeds to raise a very capable daughter on his own.
- Les Innommables: Alix gives birth to her and Mac's baby, hoping for a son that will help her take vengeance. Unfortunately, it's a girl, and they end up separated for years before being reunited.
- In Faith by sbmcneil, Bellatrix Lestrange rapes Harry in order to bear a child to serve as Voldemort's heir. Once the baby turns out to be a girl, Bellartix dumps her on Harry's doorstep.
- In Time Fixers: Nicktoons of the Future, it is mentioned and shown in flashbacks that Danny and Sam had thought Darry was going to be born a girl. Danny had planned on naming him "Delilah" and Sam's parents had bought tons of dresses.
- Not Empath, but Hefty was expecting Empath's child with Smurfette to be a boy when Smurfette gives birth in the Empath: The Luckiest Smurf story "The Birth Of Psycheliana". He is disappointed when the child turns out to be a girl, only because that means he lost a bet to his brother Handy.
- In Disney's Lady and the Tramp, Lady's owners talk about how it's impossible to tell what gender their baby will be, with the father coming in with sporting toys and the mother writing a list of girl names. Ultimately they have a son. He has a very pink room but it's likely a case of Deliberate Values Dissonance—in The Gay '90s pink was a much more neutral, even masculine, colour than it is considered today.
- At the start of The Lion King II: Simba's Pride, Timon and Pumbaa believe their new niece to be a male until Rafiki informs them otherwise. At the end of the original film the cub was male.
- Atlantis: The Lost Empire:
Audrey: I took this job when my dad retired...but the funny thing was he always wanted sons, right? One to run his machine shop, and the other to be middle-weight boxing champion! But, he got my sister and me instead.
Milo: What about your sister?
Audrey: She's 24 and 0 with a shot at the title next month...anyway, I'm saving up so my papa and I can open another shop.
- Storks: The little neglected boy whose letter to the storks sets the plot in motion specifically asked for a baby brother. He remarks on this when his pink haired baby sister is delivered. He relents, however, when the baby girl turns out to have the ninja skills he also specifically requested.
- Juno: Played with; Juno deliberately ignores the prenatal test, feeling it'd be more interesting for the couple adopting her baby to not find out its sex until the day of the birth. As a result, Vanessa spends a lot of time trying to avoid this trope and fussing over what are befitting bedroom colors for both genders. (It ends up being a boy.)
- A joyful Henry VIII of Anne Of The Thousand Days strides into his new wife's bedchamber to greet his newborn son and heir. Upon discovering that the child is a daughter, the joy drains away, and Henry turns to leave.
Anne: Sire, will you not kiss your daughter?
Henry: Perhaps later, when she has a brother.
- The Avengers (1998). While Steed is fencing with Mrs. Peel, he asks her "To what do you attribute your overachievements?" She responds "My father always wanted a boy." In other words, she excels in stereotypically male pursuits (such as science, fencing and chess) because she's trying to fulfill her father's wishes.
- Krampus: Uncle Howard's two oldest daughters Jordan and Stevie are very noticeable tomboys. In his Christmas letter to Santa Claus, their cousin Max points out that Howard really wanted sons. Jordan and Stevie mockingly read his letter out loud at the dinner table but get upset when they read this part.
- Natasha Romanoff aka Black Widow in Avengers: Age of Ultron joking calls the unborn child of her best friend Clint Barton a traitor after finding out it's going to be a boy and thus cannot be named after her.
- In Go West, Young Lady, Belinda's father was a veteran Indian fighter who wanted a son. Although he tried to raise her as a lady, he couldn't resist teaching her how to shoot and ride, and nicknamed her 'Bill'.
- In Firestorm (1998), Jennifer explains that her father was third generation career marine who wanted a son to carry on the family tradition. Instead, he got three daughters. As a result, their summers were like boot camps as they received training in military and survival skills.
- A minor plot point in Frankenstein's Castle of Freaks is that because Count Frankenstein's only child is a daughter who is about to marry, the Frankenstein name will die with him. Krista hints none to subtly that it is not too late for him to remarry and father a male heir.
- In David Copperfield, the title character's aunt, Betsey Trotwood, was certain that he was going to be a girl, and requested that the baby be named after her. She is enormously disappointed when the baby is a boy. She eventually warms up to him, though when she becomes his guardian, she sometimes says, "Your sister, Betsey Trotwood, would have never done that" when he misbehaves.
- In the novelization of Revenge of the Sith, Padme says the child will probably be a boy, based on "motherly intuition". Anakin jokes back that its strong kicks in the womb mean "definitely a girl". As it turns out, it's twins, Padme initially saying to name the first child Leia before seeing it's a Luke.
- In the novel Middlesex, protagonist Calliope's parents wanted their second child to be a girl, and it turns out she has 5-alpha-reductase deficiency and is genetically XY with ambiguous genitalia, but the doctor delivering her is nearsighted and fails to notice this when she's born, meaning Calliope (later Cal) is effectively Raised as the Opposite Gender until puberty.
- In the Discworld novel Equal Rites, a wizard aware of his impending death is searching for an eighth son, due to be born very shortly, to whom he can pass on his staff. He finds the village blacksmith, a father of seven sons whose wife is currently in labour. Both men confidently agree number eight will also be male. They are both wrong, so the world's first female wizard is born.
- Part of the backstory in And Then There Were None. Hugo Hamilton was the current heir to his brother's estate and deeply in debt, so he was hoping for his brother's baby to be a girl. Despite the birth of Cecil, he adored his nephew, something Vera never understood when she deliberately sent Cecil to his death, thinking Hugo would inherit and marry her. Hugo realizing this caused him to break up without denouncing her to anyone except Wargrave.
- Twilight: Breaking Dawn: When she is pregnant, Bella continually fantasizes about her son, whom she plans to name "Edward Jr.". She mentions that if it's a girl she'll be named "Renesme", but she knows in her heart that it will be a son. But the baby turns out to be a girl after all.
- Billie Jo's father in Out of the Dust wanted a boy but ended up with a daughter. He gave her a Tomboyish Name and raised her similarly to how he would a boy. When he finally does get a son over ten years later, the baby dies moments after birth.
- Stephen from The Well of Loneliness has a Gender-Blender Name because her parents wanted a boy.
- In Buttercup's Baby, the planned but never-finished sequel to The Princess Bride of which excerpts were appended in the 25th anniversary edition, Buttercup dreams that her child with Westley will be a boy, but they have a girl.
- In the Little Princess book "I Want a Sister", the preschool-aged princess finds out her mother the Queen is pregnant and wants a sister on her belief that "brothers are smelly". She gets a brother anyway.
- Mentioned in Harry Potter and the Deathly Hallows, when a manifestation of Voldemort's Horcrux taunts Ron by calling him a talentless Unfavourite who only exists because his parents were trying for a daughter. Since the Horcrux specifically targets its bearer's insecurities, it's not a reliable indication of the Weasley parents' opinion of him.
- The School for Good and Evil: Sophie's father wanted a boy. She feels unloved by him, attributing it to this. The night the kidnappings are expected to take place, she reflects:
True, Stefan had locked her in at sundown, given her a kiss, dutifully acted the loving father. But Sophie knew the truth. She had seen it in his face every day of her life. Her father didn't love her. Because she wasn't a boy. Because she didn't remind him of himself.
- In The Fifth Season, Tonkee's family negotiated an Arranged Marriage soon after her birth, under the impression that she was their son. Her coming out as transgender and being more interested in academia than family politics derailed their ambitions for her, so eventually they got her enrolled in a good university and quietly disowned her.
- Frexspar and Melena fully expected for their firstborn to be a boy. Frexspar is the seventh in his family line to be male. They expected a eighth, but instead Elphaba was born the first female in generations. Though, there are some lines that suggest Elphaba might be intersex. There's some confusion surrounding her sex upon birth, but it's decided upon that she's a girl. Frexspar's second child, Nessarose, was also a girl. His sole son is Shell.
- Nanny doesn't tell Melena that an alchemist predicts that her second will be a girl, for fear that Melena will abort the child.
- Patience And Sarah:
- Patience's parents thought she'd be a boy due to how hard she kicked in the womb. Her father was half-heartedly disappointed that such a spirited child could be female and hoped that naming her "Patience" would provoke her to grow up softer.
- Only having daughters, Sarah's father decided to raise his biggest daughter similarly to a boy. Since age nine Sarah has dressed like a man, acted like a man, and generally been treated like a man. Her father has exceptions to this, though. When Sarah falls for a woman, he reacts violently.
- In The Tudors while Anne Boelyn is giving birth Henry is discussing the feast arrangements to celebrate his son's birth. As in real life, it was a girl.
- On Murphy Brown, pregnant Murphy was certain her child would be a girl, as all the other women in her family have only given birth to girls for many years. When prenatal tests reveal that she's expecting a boy, she remarks on how she's been looking forward to teaching her child to hit a baseball, play poker, and so on ... but, hey, she can probably do these things with a boy too.
- Night Court: A man (played by Dick Butkus) and woman are having a baby and their doctor assured him it would be a boy based on the ultrasound. When the baby is born it's a girl. The man is disappointed, having already bought a baby-sized baseball mitt for him.
- In this skit on the Israeli satire show The Jews Are Coming, the kibbutz members have voted and decided that their pregnant member's child will be a girl, but it turns out to be a boy. As it takes place in the early days of Zionist settlement of Palestine, getting a mohel to come over from the nearest town is too much of a hassle, so they let one of their members do it... with a huge wire cutter. After the deed is done, a few members all express their pleasure at how 'everything turned out fine' and agree that she is indeed a charming girl.
- Jacob Carter of Stargate SG-1 wanted a son (military man, etc.), so when is daughter was born he named her Samantha and almost everyone calls her Sam.
- Robin's father from How I Met Your Mother so wanted a son that he actively denied his daughter's gender and forced her to join male hockey teams, smoke cigars, and go deer hunting. His response to seeing Robin kissing a guy on the hockey team is a disgusted and unironic "I Have No Son!."
- In Mad Men when Betty is pregnant with the Draper's third child, she keeps insisting it will be a girl. She has a strained relationship with her oldest daughter, Sally, and a distant relationship, Bobby, her son. She seems to be looking forward to having another daughter with whom she might perhaps develop a closer relationship. She tells everyone who asks, even in the delivery room, that it will be a girl. However, when the baby is born, it's baby Gene, a boy.
- Magnificent Century: Hurrem initially rejects her daughter Mihrimah after she is born and refuses to nurse her. She was not just determined, but utterly convinced she would have another son, and outright accuses the harem staff of stealing her newborn prince and replacing him with a girl. Justified per Ottoman reproductive politics, in which women with sons are women with power, but other characters are nevertheless appalled by her callous behavior toward the baby.
- In one episode of All in the Family, Edith reveals to her daughter Gloria that Archie actually wanted a son. The entire time Edith was pregnant, Archie told her "keep thinking 'boy', 'boy'!" So the entire time she was pregnant, Edith kept thinking "Boy, boy, boy do I want a girl!"
- In The Big Bang Theory, Penny's father wanted a son, which made her psychologically damaged. At least that's what Beverly thinks.
- In iCarly, Carly tells Freddie to put something in his jewelry box, causing everybody to start snickering. Freddie then angrily mentions that his mom wanted a daughter.
- Megan Reeves of NUMB3RS suggests at one point that this is the root of many of her issues with her father. He had three daughters already and the fourth pregnancy was his last chance to have a son. Megan suggests that she tried to be the next best thing to gain his approval, but the issues between them eventually escalated to the point where she ran away from home.
- In Law & Order: Criminal Intent, serial killer Jo Gage tells Goren that her father, a criminal profiler and Goren's mentor, wanted a son and didn't know what to do with a daughter; she even says that he was more of a father to to the killers he studied than he was to her. She ends up copycatting a serial killer just to get her father's attention.
Jo: Tell my dad everything. He'll come to my cell now. He'll talk to me. He'll listen. For as long as it takes, he'll be there.
- Dr. Quinn, Medicine Woman's Tomboyish Name "Michaela" is explained by the fact that after three girls, he had been wanting/expecting a boy. Unusually, rather than being shunned by him, she instead became a Daddy's Girl, even becoming a doctor like he was.
- Similarly, the Reed Sisters all have tomboyish nicknames (derivatives of their undeniably feminine real names) as there father had always hoped for at least one boy among his many daughters. Once again, he's never implied to have been anything but a good father, with his only disappointment being that none of them wanted to be a doctor like he was (though the illegitimate fifth daughter who he never knew did in fact become one).
- The Who and their ballad I'm A Boy (But My Mother Won't Admit It), in which a brother to several sisters relates the woes of being born male to a mother who really wanted another daughter.
- The Nirvana song "Been A Son" is about a macho father who wanted a son not a daughter.
- Carrie Underwood's "All-American Girl" starts with the titular character's father dreaming of having a son, but changing his mind as soon as he finds out his baby is a girl.
- An episode of Adventures in Odyssey has a boy go with his parents to the hospital with his mother who is pregnant. The family thinks that the baby is going to be a boy, and they decide to name the boy "Billy". The mother then miscarries. Later that night, the son has a dream where he meets his younger sibling who turns out to be a girl named "Billie" and has gone to Heaven.
- In Carousel, when Julie tells Billy she's going to have a baby, he soliloquizes about how he'll raise his son for a few minutes before he comes to a sudden realization: "What if he is a girl?" He reworks his plans based around the guess (which turns out to be correct) that it will be a girl:
What would I do with her? What could I do for her?
A bum—with no money?
You can have fun with a son,
But you got to be a father
To a girl!
- In The Musical of Shenandoah, Charlie joyously sings "It's a Boy" when Anne has a baby. His song is interrupted by the news that it's a girl.
- In Matilda the Musical, when Matilda is born, her father thinks the doctor has stolen her "thingie".
- In Lizzie, the title character claims that her father wanting a boy is the reason her middle name is "Andrew." Becomes a rather dark Brick Joke at the end of Act One, just before Lizzie kills him.
Lizzie: He'll wish he had that son!
- Parodied in The Curse of Monkey Island when Guybrush meets Haggis McMutton:
Guybrush: Haggis. That's an unusual name.
Haggis: Aye, but Haggis be only a nickname. My real name is Heart Liver And Kidneys Boiled In The Stomach Of The Animal McMutton.
Guybrush: Oh, your parents were expecting a girl.
- In Harvest Moon 64, Karen's father Gotz will sometimes complain about how he wanted a boy because he doesn't understand girls.
- From one of Lance Corporal Vivian Monroe's audio diaries in BioShock Infinite:
Vivian: At today's muster, Slate asked me if I was Sergeant Monroe's daughter. I said, "Yes, sir, I am." Slate said, "Your father always wanted a son. I hope the fool has wisdom enough to recognize his good fortune."
- Yandere Simulator: As said in the online character listing: Kencho Saikou, who is Megami Saikou's younger brother:
He is aware that his father wanted his firstborn to be a son rather than a daughter;
- In Gunnerkrigg Court, George Parley's father was a legitimate psychic. As a demonstration of his skills, Mr. Parley filled out the birth certificate for his first child, before they were born. He got every detail right except for the sex. He corrected the form but kept the name, because everyone thought it was hilarious. That's how he wound up with a daughter named George.
- Kronar on Oglaf hails from a proud lineage 'free from woman's taint'. When he begets a daughter, he orders, 'Affix the Bow of Shame. Throw her into the Wolf Pit.' So she does exceedingly well, and Kronar inverts I Have No Son! and tearfully claims, 'She is truly my son.'
- Whateley Universe: As per Word of God: Mr. Magic's son 'Artie' is actually 'Gwen'. He had an affair and she got pregnant, she broke off the affair out of concern 'about raising a child in the unstable life [he] led'. When he saw his child, "for some reason, possibly involving Gwen's tomboyish appearance, he mistook her for a boy. Seeing how elated he was in having a son, she decided to play along and her mother also went with the charade, both telling Mr. Magic that his daughter was a boy."
- In this Not Always Romantic story, the guy outlining the planned course of his married life includes assigning the gender and birth order of his kids ... on a first (and last) date.
- In the first Super Mario 2 episode of Game Grumps, Danny is shocked to learn that despite her feminine appearance, the game's creators intended for Birdo to be transgender. Him and Arin then start riffing on the idea that Birdo's parents desperately wanted a daughter and tried to raise her as female.
- On TV Tropes The Webcomic, Retrope's second name is "Rudolf", because her father, a mafia boss, wanted a son to succeed the family business.
- Dill from Rugrats was expected to be a girl. He was going to be named after Stu's late mother, Trixie, but ended up being named after Didi's cousin Dylan.
- The in-series reason why Timmy from The Fairly OddParents! has so much pink clothing is because his parents expected a daughter.
- In the Classic Disney Short "Casey Bats Again", a sequel to Casey at the Bat, Casey's wife has a baby, which he plans to groom to carry on his baseball legacy. But one day, while changing the baby's diaper, Casey discovers to his horror that his heir is actually a girl. He ends up having nine daughters in total, who become female baseball players.
- On Family Guy, it's revealed that Peter had this reaction to Meg's birth.
Doctor: It's a girl!
[pan to Peter decked out in sports gear]
Peter: Uh, are you sure?
- It's also parodied in a later episode when Peter creates a homemade "chick flick" and plays a gruff military man who openly disavows his daughter (played by Lois) the moment she's born by declaring, "Oh no, it's a girl! And I hate girls!"
- In Phineas and Ferb as part of Doofenshmirtz's very elaborate tragic back-story, his parents had been expecting a girl when the mother was pregnant with Doofenshmirtz's brother Roger. They spent all their money on girls clothes in advance, and that was what Doof was forced to wear for a full year.
- In Kim Possible special "A Sitch in Time", there is a scene where we see Kim when she went to Kindergarten. Kim is nervous about going into the Kindergarten and tells her parents that she wants to be with them and her unborn "baby sister" (Kim's mom is pregnant in this scene, remember this was the past). Regular viewers would put two and two together and realize that the "baby sister" turns out to be "Jim" and "Tim" - Kim's brothers.
- In a flashback episode of The Simpsons, Homer mistakes Maggie's umbilical cord for another part of the male anatomy.
Homer: It's a boy! And what a boy!
Dr. Hibbard: That's the umbilical cord. It's a girl.
- However, Homer seems to be satisfied with this and loves his baby girl just the same.
- In The Loud House, it's mentioned that Lincoln's family expected him to be a girl. He is the only boy out of ten (then five) girls. Apparently, his original bedroom was themed for girls because their mother expected another one. Subverted when Lincoln's parents tell him that they were just using his sister's hand-me-downs.
- In the Codename: Kids Next Door "W.H.I.T.E.H.O.U.S.E", Numbuh 1 wakes up in a world where he is the president and has a son named Shirley. Named because his wife, Lizzie, wanted a girl.
- The Warner Bros. short "Slap-Happy Pappy" features a rooster and his wife wanting to have a son, only for all five of their eggs to hatch into girls.
- Star vs. the Forces of Evil: Due to Mewni being a matriarchy, daughters are more valuable than sons, and girls are expected to have powerful magic in order to rule effectively. As stated in The Magic Book of Spells, when Jushtin was born, Skywynne was content with having a son and wanted him to achieve great things, so she named him her heir and gave Jushtin the Magic Wand and her Book of Spells so he could become a great mage King like her. However, Skywynne's subjects didn't want to accept a male ruler on the throne, and pressured her to give birth to a daughter. When she did, she pretended to celebrate in public and immediately forced Jushtin to supersede his claim to the throne and give up his Magic Wand... but in private, she deeply regretted her actions, and had to keep herself from crying as she announced the news to Jushtin.