All perfect praise be to Allaah, The Lord of the worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad, sallallaahu ‘alayhi wa sallam, is His slave and Messenger.
Whoever has sexual intercourse with his wife thinking that the prayer is not yet due or the time of prayer has not yet elapsed, and then realizes that it has, should perform the due prayer after its end time. There is no blame on him due to the lack of willful intention to miss the prayer. Unintentional errors and forgetfulness are forgiven in Islam. The Prophet, sallallaahu ‘alayhi wa sallam, said: "Allaah Excused for my Ummah (i.e. nation) unintentional errors, forgetfulness and whatever they are coerced to do." [Ibn Maajah]
However, if there is not enough time left (before the end time of the prayer) and a man has sexual intercourse with his wife and the time of the prayer elapses, then he is considered a sinner in such a case. He is not so for having sexual intercourse with his wife, since this is lawful for him, but for letting it be a reason to neglect the prayer.
Nevertheless, you should make up for this missed prayer if you have not already done so.