One honest recent race result can forecast the others. The Riegel formula, used by coaches since the 1970s, scales your time by distance with an endurance exponent of 1.06.
Predictions assume training suited to the target distance. Results are estimates for education, not medical advice. If you have a medical condition, are pregnant, or are returning from injury, talk to a qualified professional before acting on any number here.
If doubling the distance simply doubled the time, a 20 minute 5 km runner would run a 2 hour 48 marathon. Fatigue makes longer races proportionally slower, and the 1.06 exponent captures that fade for trained runners. Beginners usually fade more, so treat marathon predictions from short races as optimistic until long runs prove otherwise.