My daughter is pregnant

I found out yesterday my daughter is 15 and pregnant. She had an IUD and thinks it may have fallen out. She was late for her period and took a pregnancy test at school that was positive. She made a doctors appointment at her OB office and told me she was getting her IUD checked. I had a mother's suspicion so I asked her if she wanted to take a pregnancy test (I never knew about the one at school until later). She said she did want to, and it was positive. She told me the whole story.

Morale of the story is that she is about 5 weeks along and has a steady boyfriend. I have educated her on safe sex. I feel like a failure of a mother. I never allowed them to be alone at my house or upstairs alone but this could have happened anywhere. I feel like I have failed as her mom.