If it becomes clear, after reliable testing, that a couple’s chance to conceive naturally is very low, they are required to undergo whatever treatments are conventionally prescribed by medical practitioners in order to fulfill the mitzva of procreation by having a son and a daughter. This includes IVF (in vitro fertilization), a procedure that involves extracting the woman’s ova and the man’s sperm and putting them together in a lab so that eggs become fertilized and develop into embryos, which are then implanted in the woman’s uterus.
In the past, poskim ruled that people are not obligated to take unnatural measures to fulfill the mitzva. However, that was at a time when methods to deal with fertility issues were not reliable, when there was no medical consensus about them, and therefore, most people were not taking advantage of treatments developed by some physicians, and, consequently, these efforts were considered unnatural. Now that these medical interventions have proven to be so successful that most infertility can be resolved, whatever is medically conventional is considered part of the obligation of this mitzva. Clearly, this obligation includes all treatments that an HMO covers for its members, and it seems to me that even treatments that are not included under regular health insurance, if they are treatments that most people who want children are willing to undergo, are required, even if they are expensive, to enable the fulfillment of the mitzva of procreation.
Even one who has already fulfilled the Torah commandment of procreation has a rabbinic mitzva to have more children, using the tools offered by modern medicine. Nevertheless, if it demands a major effort, it is only an embellishment of the mitzva.
It seems that all of this applied when use of IVF was rare and its efficacy uncertain. However, now that fertility treatments have become commonplace and successfully resolve most cases of infertility, they have become part of the normal effort that a couple must make in order to fulfill the mitzva. Just as a man cannot claim that he need not buy his wife a refrigerator and an oven because no one had them 200 years ago, so he cannot claim that he need not try to fulfill the mitzva of procreation using these procedures because a hundred years ago people did not do so. It cannot be that the Jewish people, who are commanded to procreate, fail to take advantage of treatments being used all over the world. This view is presented by R. Shlomo Daichovsky in Teḥumin 22, p. 406. He goes so far as to say that if necessary, a couple must spend very substantial amounts of money for these treatments. If there is a reason that the treatments are difficult for one spouse, a rabbi should be consulted.
Some claim that the mitzva is to conceive naturally, through sexual relations, while any other method does not fulfill the mitzva. However, according to Minḥat Ḥinukh (1:13), the mitzva is to have children; how this comes about is immaterial. The opinion of Tosafot (Bava Batra 13a s.v. “kofin”) is the source for those who limit the mitzva to natural means of conception (Be-ohala Shel Torah 1:69; it is also possible to understand Mishpetei Uziel, EH 2:19 this way). This limitation is surprising. Of course, it is clear that the biblical mitzva to procreate assumes sexual relations. Nevertheless, the essence of the mitzva is for the couple to have a son and a daughter. Thus, if there is an alternative way for them to conceive, they are obligated to try it. This is not comparable to the case of a woman who is impregnated from a man’s sperm in the bath. There, poskim express uncertainty as to whether or not the father has fulfilled the mitzva of procreation (Ḥelkat Meḥokek, EH 1:8); they are inclined to rule that he has not (She’elat Ya’avetz 2:97), since this is not a normal way to conceive. However, now that people regularly conceive through IVF, husband and wife do fulfill the mitzva this way. It seems to me that the Aḥaronim who agree with Tosafot that the mitzva involves having intimate relations (Har Tzvi, EH §1; Igrot Moshe, EH 5:19) really mean that an action must be taken deliberately for the purpose of fulfilling the mitzva. If this is correct, the deliberate act of undergoing IVF qualifies, and thus the couple would fulfill the mitzva even according to those Aḥaronim.
However, in my humble opinion, if a man becomes a sperm donor for pay, and his sperm is used to impregnate someone, he does not fulfill the mitzva. The normal way to fulfill the mitzva is through intimate relations between husband and wife, or at the very least through their mutual consent to IVF. In contrast, if a man does not even know whom he is impregnating, he does not fulfill the mitzva. This is implied by the manner in which the mitzva was relayed to Adam and Ḥava. God commanded them together: “Be fruitful and multiply” (in the plural). The use of the plural form implies an instruction to husband and wife as a couple. And since a man does not fulfill a mitzva through sperm donation, it is prohibited, because he is wasting his seed.