Melanie Martin, a surgical nurse in San Diego, said she and her husband cut every corner they could think of to save up enough money to pay for conceiving a child through the technique known as in vitro fertilization.

Like most insurance plans, theirs didn’t cover the procedure, so they sold one of their cars and she took extra shifts at work. They put part of the cost on credit cards and bought the drugs through an online pharmacy with lower prices. Their first two cycles were unsuccessful, so they took a break to pay off more than $40,000 in debt they had accumulated from the treatment, and began saving for a third cycle.

Ms. Martin became pregnant in May 2013, and the couple expect their child shortly.

They are living in a one-bedroom apartment, with the nursery in the dining room. She and her husband most likely would have tried again if the third cycle had not been successful, she said, but she advises others to think carefully about how much debt they take on in their quest for a baby. “Even though we went through all the treatment to get our family,” she said, “at the end of the day you’re right back with the rest of the world and have to provide for that family.”

Thirty-five years after the first “test tube” baby was born, in vitro fertilization is the most common assisted reproductive technology used to treat infertility. More than 61,000 babies were born as a result of I.V.F. and related techniques performed in 2011, according to the Centers for Disease Control.