Nearly half of all pregnancies in the United States are unintended. While some of these pregnancies undoubtedly happen without birth control measures in place, some of them happen because, well — birth control measures aren’t foolproof.

So if you’re one of the women who’ve been surprised by ineffective birth control, know that you’re not alone.

And if you’re now looking forward to your pregnancy but wondering what happens if you continue your birth control — or if you are worried you did some harm by staying on birth control while unaware of your pregnancy status — here’s what you need to know.

First up, a reminder of what birth control is and how it works so you can better understand its effects on pregnancy.

Birth control is any method you use to prevent pregnancy. There are plenty of options out there: barrier birth control (think condoms), surgical methods (tying tubes or vasectomy), and hormonal birth control are some of your options.

The most common form of hormonal birth control is the pill. Birth control pills are more than 99 percent effective when used correctly. Sounds almost foolproof, right? Not quite. We’re human and sometimes we skip doses. That means the pill is only 91 percent effective in reality (“typical use”).

Those who want to avoid daily pills (and the human error that comes with them) may prefer intrauterine devices (IUDs) or implants. These are more than 99 percent effective. (Yes, that’s IRL typical use.)

Ectopic pregnancy: Good to know

If you’re taking the pill, you’re not that likely to get pregnant. But keep in mind that if you’re taking the minipill (which contains only progestin), you may have a slightly higher chance of an ectopic pregnancy (a pregnancy where the egg implants outside the uterus).

An IUD is so good at preventing pregnancy in the uterus that when it does fail, it’s more likely to result in an ectopic pregnancy.

Healthline

So let’s say that you’re among the number of women who do get pregnant while taking the pill. You’ve got questions buzzing round your head. We got you:

Have you done harm?

We’ll give you the bottom line and then dive a little deeper: Don’t worry. It seems to be largely a myth that taking oral contraceptives can lead to birth abnormalities. A 2015 study says that even if you’ve taken the pill while pregnant, your baby isn’t at risk for major congenital abnormalities.

If you’ve heard conflicting info, it might be because older studies suggested that contraceptives containing the hormone progestin could lead to hypospadias — a congenital malformation that affects the urethral opening of the penis. But more recent consensus is that this isn’t the case.

A 2016 study suggests that babies born to mothers using the pill have an increased risk of wheezing and rhinitis (a stuffy and runny nose).

What are the risks of continuing?

Any hormonal drug that you take makes its way to the baby you’re carrying. This includes the contraceptive pill. So while there don’t seem to be any risks, it’s best to stop taking the pill once you learn of your pregnancy.

What to do next

If you’re on the pill and think you’re pregnant, the first step is a home pregnancy test. If it’s positive, stop taking the pill.

If you can’t get a pregnancy test but think you may be pregnant, stop taking the pill and use a different form of birth control until you can confirm the pregnancy.

Healthline

Less than 1 in 100 women with an IUD get pregnant each year, and the risk is highest within the first year after insertion. If you’re the 1 in 100 women, you’re probably wondering what happens if you keep your IUD.

The truth is that you may be facing certain risks. There’s no known increased risk of congenital abnormalities, but your risk of miscarriage and premature birth both go up.

Infection

One risk of keeping your IUD in during pregnancy is an infection known as chorioamnionitis.

Chorioamnionitis occurs in up to 2 percent of births in the United States and is one of the causes of premature delivery. When this happens, the membranes that surround the baby and the amniotic fluid that the baby is floating in both become infected.

Placental abruption

Sometimes the placenta can separate from the uterus before or during delivery. Researchers aren’t sure, but there may be a link between becoming pregnant with an IUD in place and developing this condition.

What to do next

Wondering what to do to avoid the risks that come with an IUD pregnancy? Your best step is to have your IUD removed early on.

However, there’s a caveat: When you have your IUD removed, you run a small risk of miscarriage — but in most cases this small risk will be lower than the risk of leaving it in.

Healthline

Barrier birth control

Barrier birth control includes condoms, sponges, diaphragms, and spermicides — all provide a physical barrier that prevents the sperm from reaching the egg so that fertilization doesn’t take place.

But if fertilization does take place — due to a broken condom, for example — there’s nothing to worry about during pregnancy. Barrier methods that prevent sexually transmitted infections are safe to continue using during pregnancy, if necessary.

Surgical methods

These involve a surgical procedure — vasectomy and tubal ligation (getting your “tubes tied”).

You’re not likely to get pregnant if you or your partner had one of these procedures — they’re considered effective and (usually) permanent. If you do get pregnant despite having a tubal ligation, you’ll want to be checked for ectopic pregnancy — a potentially life-threatening pregnancy outside the uterus.

But if you have a normal uterine pregnancy, nothing special needs to be done while you’re pregnant.

Non-pill form of hormonal birth control

Like the pill, birth control implants deliver hormones — just without the need to take a daily medication. This category includes a small rod inserted under your skin, stick-on patches, a vaginal ring, and shots.

Like the pill, these hormone delivery devices are relatively safe, even if you become pregnant (which, we know, isn’t what’s supposed to happen). And similar to the pill, if you get pregnant and choose to stay pregnant, you’ll want to stop the hormones — either by having an implant removed or by discontinuing use of the patch, ring, or shots.

Most women spend a few years of their lives trying to get pregnant and about 3 decades trying to avoid pregnancy. If you’re unexpectedly expectant, remember that it has happened to others.

Your first move is a home pregnancy test to find out for sure. Positive? Turn to your health practitioner to discuss your next move, including what you should do about current medications like birth control.