This article objectively estimates the spatiotemporal evolution of b values before and after two large earthquakes during 2000-2019 along the Longmenshan fault. We apply the Akaike information criterion to statistically assess the temporal variation in b values and use the b value time series behavior as a tool to quantify the effect of a mainshock on the size distribution of aftershocks. The b values in the source regions exhibited decreasing trends prior to two large earthquakes on 12 May 2008 ( 8.0) and 20 April 2013 ( 7.0). Moreover, the times required for the b values to return to a stable state after both mainshocks were basically equivalent to the times taken for aftershocks depth images to cease to change visibly (approximately 1 year following the 8.0 event and approximately 10 months following the 7.0 event). Our results have substantial implications for assessing the hazards of aftershock sequences.