Joshua was approximately 50 years old when Moses died. This estimation is based on several references in the Bible that outline the timeline of their lives and the events that occurred.
In the book of Numbers, we learn that Joshua was one of the 12 spies sent to scout the land of Canaan when he was around 40 years old (Numbers 13). After the Israelites wandered in the wilderness for 40 years due to their lack of faith, it is understood that when Moses died, Joshua was about to lead the Israelites into the Promised Land. Given these contexts and timelines, this places Joshua’s age around 50 at the time of Moses’ death.