Due to recent budget and fiscal constraints, it is ever more imperative for transit agencies to manage their fleets in an optimal way. Fleet data have consistently shown that bus operational and maintenance (O&M) per-mile costs increase as buses age. From a purely economic perspective, there is a cost tradeoff between the lower O&M costs of newer fleets and their higher initial capital costs. This tradeoff has a significant impact on the optimal timing of purchase and replacement decisions. Utilizing realistic cost data and an optimization modeling framework, we analyze (a) the impact of purchase timing decisions on fleet per-mile costs and (b) the key factors and variables affecting the optimization of transit diesel and hybrid bus fleets. Given uncertain and hard-to-forecast market variables, multiple scenarios are examined and sensitivity analyses are performed to study the impacts of key variables on optimal replacement policies and costs. In terms of the impact of purchase timing decisions on fleet per-mile costs (a), results indicate that: 1) increases in diesel prices do not affect total bus fleet costs as much as increases in maintenance costs; 2) increases in maintenance costs and utilization per year reduce the optimal replacement age; 3) increases in utilization and fuel economy have a similar impact in terms of total fleet costs; and 4) bus purchase-price changes have a significant impact on the optimal replacement age. In terms of the key factors and variables affecting the optimization of transit diesel and hybrid bus fleets (b), results indicate that: 1) the Federal Transit Administration (FTA) purchase cost subsidy has the highest impact on the optimal replacement policies; 2) without the FTA subsidy, the optimal policy is to choose the diesel bus unless the purchase cost difference is larger than 10%; 3) with an 80% FTA purchase cost subsidy, the hybrid bus is always the best choice unless fuel economy difference between the hybrid and diesel buses is substantial; 4) maintenance costs affect the optimal replacement age but are unlikely to change the optimal bus type when comparing diesel and hybrid technologies; and 5) greenhouse gas emissions costs are not significant and affect neither bus type nor replacement age.