In pregnancy, the term "viabilty" is often used to describe different situation. Viability may apply to the baby potentially surviving if born prematurely, and it also may mean that the fetus is still alive inside the uterus.
The pregnancy is viable
This is usually used to describe a pregnancy that is doing well. A viable pregnancy means that there is a fetal heart beat and that the fetus is alive. Or before there is a fetal heart beat (before 6 weeks 3 days) it could mean that the pregnancy hormone hCG is rising normally.
The fetus or baby is viable
This refers to the time in pregnancy when the baby, if born now and prematurely, has a reasonable chance of survival. For most hospitals in the United States the age of viability is about 24 weeks 0 days of the pregnancy. However, being born at 24 weeks does not mean that most babies will survive or that if they survive they will have no problems. The chances of survival increase with each day after 24 weeks, and the risks of complications decrease.
At 24 weeks is the cutoff point for when many doctors will use intensive medical intervention to attempt to save the life of a baby born prematurely including doing a cesarean section. Between 23 and 24 weeks is a "gray zone" where most doctors would not intervene. And below 23 weeks weeks doctors are unlikely to do a cesarean section for fetal reasons and most neonatologist will not resuscitate a baby born before 23 weeks, and many won't resuscitate a baby born between 23-24 weeks.
A baby born at 24 weeks would generally require a lot of intervention, potentially including mechanical ventilation and other invasive treatments followed by a lengthy stay in a neonatal intensive care unit (NICU).
Odds of survival increase as the pregnancy progresses, and even an extra week in the womb can make a difference. In general, premature babies born closer to 37 weeks will be much better off than those born before 28 weeks.
The pregnancy or fetus is nonviable
A nonviable pregnancy would be a pregnancy where there is no heart beat or where the hCg is not rising normally. It could be a pregnancy with a dead fetus. A nonviable pregnancy is a pregnancy without a chance of a live infant being born or without the fetus having a chance to survive if born alive.