Wow! That is an awesome question! And it’s also kind of a tricky one to answer because the Bible never really says how old they were. However, we do get an idea by doing a word study on the words that describe Mary from Matthew 1:23 which reads, “The virgin will conceive and give birth to a son, and they will call him Immanuel.”
The word “virgin” here is the Greek word “parthenos” which literally means, “A marriageable maiden” as well as its other meaning (go ask your mom!). Matthew 1:23 is referencing the words of the prophet Isaiah of the Old Testament and helps us get a slightly better idea of her age. Isaiah 7:14 says, “Therefore the Lord himself will give you a sign: The virgin will conceive and give birth to a son, and will call him Immanuel.”
In this instance, the word “virgin” is the Hebrew word “almah.” The word “almah” means a young, woman of marriageable age. Based on cultural norms of the day, historians have now assumed that Mary was likely somewhere between the ages of 13 and 15.
There is absolutely no information on Joseph regarding his age anywhere in the Bible. What we do know of Joseph was that he was a carpenter, which leads many to believe he was older because he already had a trade. But to definitively say that Joseph was 18 or 20 or 25 would only be conjecture.
Joseph was likely older than Mary but what age difference, we just don’t know.