How long does Birth Control pills last?

Iris

I have been trying to get pregnant but I have been under birth control for medical reasons. I stopped for about 3 weeks now and took the pregnancy test and came out negative. Does anyone know how long will it be until it were's off?