To predict your marathon time, race shorter races about a month or less than the marathon.
Marathon Time Calculator
For a 10K race, multiple your time by 4.67 to predict your marathon time. For a half-marathon, multiple your time by 2.1. For example, a 10K time of 45:30 would predict a marathon time of about 3:32:30; a half-marathon time of 1:35 would predict a marathon time of about 3:19:30.