Joseph was 39 when he met his family again and Judah is roughly 6 or 7 years older than Joseph (if all the brothers are one year apart). So Judah would be roughly 46 when he entered Egypt.
Interestingly, his youngest son Perez is the only grandson of Jacob among the 70 souls who is recorded to have entered Egypt with his own sons!
I've heard the version that Er and Onan were 8 years old when they were married, but I don't think such a thing would be done, nor would it make sense that Er died as a child and especially Onan for committing a sin that would likely be impossible to commit at that age. The earliest I can see any of them getting married is 12, at the onset of puberty.
If Judah was married at 12, Er was born to him at the age of 13. If Er died at the age of 12, Judah would be 25 and Onan died a year later, making him 26. If it took shelah the minimum of 1 year to mature, then Judah would've been 27 when he cohabited with Tamar and 28 when Perez was born. So with these minimum ages I've given Judah and his sons, it would make Perez 18 years old when he entered Egypt.
However, I wonder if there is something more concrete than mere guesses? It just seems strange that Judah and his sons would get married so early when up until this point, Isaac and Jacob didn't marry for a while (perhaps Abraham as well). And yet, here is Judah who must have married early and he has a son that comes into Egypt with his own sons.
TL;DR Ultimately my question is whether we know how old Perez and his sons were when they went down to Egypt and also, was he really the only grandson of Jacob to enter Egypt with his own sons? Even his brother Shelah, who is at least a decade older, didn't manage such a feat.