Twitter comedian Chrissy Teigen and her ultrasmooth husband John Legend are having a baby girl. And not just by chance — having a little lady Legend, Teigen has said, was completely the couple’s choice.

“Not only am I having a girl, but I picked the girl from her little embryo,” Teigen said in an interview with People. “I picked her and was like, ‘Let’s put in the girl.’ ”

Teigen’s done a pretty good job explaining the concept of in vitro fertilization to her massive Twitter army in 140 characters or less. But the biology is slightly more sophisticated than that.

In vitro fertilization, or IVF, is a relatively common fertility treatment for couples having difficulties conceiving. In IVF, fertilization occurs outside of the body — eggs and sperm are mixed together in a laboratory dish. Once scientists can confirm that the eggs are fertilized and undergoing cell division, they’re considered embryos.

About three to five days later, parents select which embryo they want to implant into the woman’s uterus. At this point, they’re already clearly male or female, so it’s entirely possible for parents to choose the sex of their future baby.

After selection, the embryo is transferred into the womb using a small tube, and, if all goes well, it latches onto the uterus within six to ten days. From this point onward, pregnancy unfolds the old-fashioned way.

When it comes to IVF, selecting an embryo is actually the easy part. Implanting it — that is, actually achieving pregnancy — remains tricky, despite the fact that IVF has been in the works since the 1940s.

According to the CDC, just 36 percent of IVF attempts result in pregnancy. About 29 percent of cycles result in an actual baby. It isn’t exactly foolproof, which is why women usually need to go through multiple cycles. By the American Society for Reproductive Medicine’s estimate, each of those cycles costs about $12,400.

IVF is the most common assisted fertility procedure in the United States, but it’s still widely and painfully misunderstood.

Since announcing her decision, Teigen has endured a Twitter backlash from angry and misinformed users lamenting her preference for a specific gender, calling her out on her wealth, and outraged that she created a baby.

Realizing the futility of having rational conversations about science online, Teigen turned to her sharpest defense — humor:

Photos via Getty/Jerod Harris