This is an extremely difficult question to answer because Fertility is a physical, emotional, and financial investment. Unless a woman is in menopause, one can never definitively provide a 0% chance for pregnancy using her eggs. However, as a woman ages, particularly above age 39 along with very poor ovarian age testing (ultra low AMH and/or elevated FSH), the prognosis for success with IVF becomes very poor.
So, there is no absolute number of IVF cycles to recommend undergoing before moving to egg donation. Nevertheless, one should consider egg donation if her IVF cycle was cancelled due to a poor response or a low number of eggs were retrieved despite a high dose of stimulation with poor embryo development.