Globalization and industrialization have significantly disturbed the environmental ecosystem, leading to critical challenges such as global warming, extreme weather events, and water scarcity. Forecasting temperature trends is crucial for enhancing the resilience and quality of life in smart sustainable cities, enabling informed decision-making and proactive urban planning. This research specifically targeted Ahmedabad city in India and employed the seasonal autoregressive integrated moving average with exogenous factors (SARIMAX) model to forecast temperatures over a ten-year horizon using two decades of real-time temperature data. The stationarity of the dataset was confirmed using an augmented Dickey–Fuller test, and the Akaike information criterion (AIC) method helped identify the optimal seasonal parameters of the model, ensuring a balance between fidelity and prediction accuracy. The model achieved an RMSE of 1.0265, indicating a high accuracy within the typical range for urban temperature forecasting. This robust measure of error underscores the model’s precision in predicting temperature deviations, which is particularly relevant for urban planning and environmental management. The findings provide city planners and policymakers with valuable insights and tools for preempting adverse environmental impacts, marking a significant step towards operational efficiency and enhanced governance in future smart urban ecosystems. Future work may extend the model’s applicability to broader geographical areas and incorporate additional environmental variables to refine predictive accuracy further.