I read both threads on "How old was Joseph" and this one "How old was Mary when Jesus was born."
A couple of things to consider when we are asking these questions:
1. Biology - as it applies to literal physical maturation.
2. Anthropology - as it applies to societies and the development of civilizations.
Anthropology:
According to general cultural practices about marriage (which crosses multiple societies, subgroups, cultures and civilizations in all eras of history). Unless the groom was royalty of some sort; men were not considered "marriage material" until they were financially stable enough to support a family. Which for most men translates to somewhere between 20 and 25 years old.
An "adult male" through the course of history has generally been considered from about 18 years old on. Not that fellows between 16 and 18 can't be emotionally / psychologically mature beyond their expectation; but there is allowance made for understanding that men under 20 aren't even fully physically grown yet. Biology has well established that humans can grow until they are 21. That's more common with men than woman. (Males enter puberty later than females and this likely is what plays this part in the differences in rates of growth between teenage girls and boys.) A man is more likely to get physically taller and gain weight in body mass past 18 years old than a woman is.
Now, in societies that had standing armies: (The Roman Empire was one. And it's not until the mid 18th century do we start to see standing armies in Europe.) A young man could generally join the army at 16. That was true for Rome and it was true for 18th century Europe. For all armies though; all soldiers between 16 and 20 years old were put in what were called "light infantry" units. Light infantry units were part of larger legions (Rome) or regiments (18th century term). Light infantry soldiers had less equipment they were expected to carry and lighter weapons. This is because they were usually smaller than their fully grown counterparts. Once they hit about 20 years old; they'd go to "legionnaire company" (Rome) or "hat company" (18th century).
Interestingly, the way armies prior to the 20th century were arranged; (industrialization and mechanized warfare changed this) armies had "camp followers". These camp followers were civilians and often times families of soldiers. Part of the responsibility for the camp followers were to secure supplies for the army. This could be a variety of things; including food sources (purchasing animals from farms for food); finding metal smithing facilities (to manufacture or repair weapons parts) and fabric for clothing. Armies traveled with people (soldiers themselves included) who had multiple skill sets. One of the skill sets the armies taught the civilian camp followers was how to fight. So yes, it was rather common prior to the 20th century to have female combatants on battlefields along with the formally recruited soldiers.
Rome actually provided weapons and body armor designed for women and children camp followers to be able to protect themselves and the encampment if the majority of the soldiers were some place else. Armies also left soldiers in camp too; but the men left behind usually weren't of the top ability to fight. They were usually recovering from injuries or illness, or they were older. For colonial armies; women and young people were provided with light infantry gear.
In the Roman army; you joined the army for life. If you made it to 65; you officially retired from the army. In colonial armies; the average enlistment was 10 years; but the majority of soldiers were part of the army apparatus their entire lives. (They'd become camp followers once they were too old to fight. Armies were also self propagating societies. Sons usually became soldiers who married daughters of other soldiers.
Now why do I bring this up about armies? (Because it shows that societies acknowledged certain realities about the developmental stages of human life.)
We see this in Scripture too. One had to be at least 20 to be in the army (Numbers 1:1-3) and priests in the temple had to be at least 25 (Numbers 8:24-26) years old to serve. In the vast majority of cultures; 18 was the age of you were considered an adult.
Biology:
Now the Hebrew language has multiple words for the different phases of life. Like we have "infant", "toddler", "child", "adolescent", "young adult" and "legal adult". Hebrew has similar words. In Hebrew though, those words aren't "age defined" they are "developmentally defined". This accounts for the understanding that not everyone is on the same timeline developmentally. (Not everyone starts puberty at the same age. Some children can walk early and some can't. Some develop language faster than others.) This is all driven by neurological brain development stuff.
Now in Hebrew; what age was considered an adult? We get some clues from various passages in the Bible.
1. No one over 20 entered the promised land. 20 was the "cut off" for who was considered "pre legal adult". (Numbers 14:29)
2. For census purposes; anyone who was under 20 was counted in the household of their parents. (Numbers 1:2-3)
3. All men who were married; in the first year of their marriage they were exempt from military service. (Deuteronomy 24:5) And since a male had to be 20 years or more to go to war; by default, he'd have to be 20 years old to get married.
Thus entered in the Hebrew words for "man" and "woman". Genesis 2:24. We have "man" and "woman". The Hebrew word for "woman" is an extended version of the same word used for "man". So if "man" meant someone over 20 years old. "Woman" also meant someone over 20 years old.
Betrothal, Marriage and Biology:
Now here's a little detail about human development that not a lot of people know. Prior to the 20th century, the average age of menstruation was 17. Today, I think it's 11? (In industrialized countries.) Interestingly though, the age of menopause hasn't changed. That still averages women about 51 years old. Puberty takes roughly 2.5 years for females. And boys generally lag behind girls about 18 months to 2 years in starting puberty. So if prior to the 20th century; the average girl didn't start puberty until about 15 years old. The average boy would be almost 17.
Also, in the OT, a woman wasn't considered marriage consummation eligible until she could bear children. Menstruation comes at the end of female puberty. So if she's averaging 17 years old at the onset of menstruation; that most likely would have been the point the wedding planning would have commenced. Even today; "engagement to wedding ceremony" is 6 months to a year. So Mary was most likely 18 when Jesus was conceived.
Now in developing countries where they eat only locally grown food (not processed western diet) we still see this. People start puberty later. There's a couple of factors here. One is diet; and the other is food supply. Biologically, a child whose calorie intake is marginally adequate; those calories will go to brain development before they go to body development. This is why children in poor countries are generally smaller (of comparable age) than children in wealthy countries.
Now fast forward from OT laws on census and military age to the NT and 12 year old Jesus runs off to the temple. His parents "freak out" and go find him. The result is Jesus goes home with them and "grows in wisdom and stature". "Stature" here means physical size. And going back to Jesus's birth and his parents offering of birds; we know Joseph wasn't a rich guy. Thus Jesus would not have been a "high caloric intake child" due to fluctuations in food supply.
There's an interesting verse in Psalm 22:9 that is likely to have certain application to "food insecurity" and God sustaining Jesus from not starving to death through different phases of his life. (Thee's a very practical reason why historically children were not weened until they were 3 years old.) So at 12; Jesus probably would have been about the size of a modern American 8 or 9 year old. So thus the reason his parents "freaked out" was Jerusalem being a large city that just had this influx of foreigners; he would have been at high risk of becoming a human trafficking victim. (Clearly Jesus hadn't started puberty yet.)
Now fast forward to the wedding of Canna in Galilee; and we can get an idea of how old Jesus was when Joseph died. Now in that passage; it says Jesus's mother "was in attendance". This doesn't mean that she was simply invited to the wedding; she was one of the people responsible for putting it on. (She was an "attendant" to the wedding.) And she tells Jesus that the groom's family ran out of wine. Jesus's response is basically: "Mom, what does that have anything to do with me?" (It wasn't that family's financial responsibility to provide wine.) Consequently, Jesus turns water into wine. (Why, because they aren't mere guests to a friend's wedding.) So, who was the bride? (The bride would have been Jesus's youngest sister.) (Now I know this is going to ruffle the feathers of Roman Catholics who believe Mary was a perpetual virgin; but clearly in Scripture, she had other children.)
So how old is Jesus? This is the beginning of his ministry and he'd be almost 37 years old. Jesus was 6 months shy of 40 years old when he died. How do we know this? Jesus was crucified in 33 AD. We know this because that is the only year of all the possibilities where passover fell between Thursday sundown and Friday sundown. He was crucified on Friday.
So when was Jesus born? We know Jesus was 2 when Herod the Great tried to kill him. (All the male children in Bethlehem who were under two years old were slaughtered.) Joseph Mary and Jesus go to Egypt. Herod the Great dies in 4 BC. We know this from Roman historical records. So Jesus is at least 2 years old in 4 BC. And considering it took them time to get to Egypt; Jesus is probably closer to 3 years old in 4 BC. So the most likely year of his birth would have been 7 BC. 7 BC was also a jubilee year and he likely was born during the feast of tabernacles. (God will tabernacle among them.) So 7 BC to 33 AD is 40 years. But because Jesus was most likely born in the fall and died in the spring; he wasn't yet 40. (This jives with "40 years in the wilderness".)
So if Jesus is 36 / 37 years old at this wedding and the sister is a minimum of 18 years old. And we know Joseph had to be around long enough for the sister to be conceived! It's most probable that Joseph would have died some time between Jesus's 17th to 20th birthday. It's most likely Joseph died in this time frame because once Jesus turned 20 he would have been expected to get married. But since he now has automatic mom and children he's now financially responsible for; mom either gets remarried or eldest son takes care of family. Well we know Jesus never got married so "choice #2" is the obvious outcome. (There are theological reasons Jesus never got married; but that's another issue.) And this is likely why his ministry didn't start until after this youngest sister was married. Note the only person he's responsible for at that point is his mother. This is why he tells mom and John at the crucifixion "Here's your son / here's your mother." And John takes care of mom.
So here we come back to the question of this thread. Pulling together all of this information (Anthropology, Hebrew words and Jewish law) Mary would have been 19 or 20 years old when Jesus was born. Joseph would have most likely been somewhere between 20 and 25 years old. Mary would have been close to 60 when Jesus died. Joseph being a laborer (who was most likely a stone mason) would have been in his mid 40s when he died. Assuming he was likely badly injured / killed in a "work related" accident. It's not uncommon for men in that era; particularly who did manual labor, to die in their 40's and 50's.
So, complex answer that takes into account many factors; but this is most likely closest to the truth based on all the evidence we have.
Here's a reference page on Hebrew words and OT law:
Many people today are getting married too young. While some believe that in bible times, the menstrual cycle determined the age for marriage, scripture actually teaches that one is not eligible for marriage until age 20.
eliyah.com