This paper presents a two-dimensional transient model for a solar air heater with phase change material (SAH-PCM), focusing on the thickness-to-length ratio (t/L) of the PCM container. Verified through experiments, the model considers single (SP) and double pass (DP) flow configurations, assessing liquid fraction, dead length, outlet temperature, energy, exergy, and system efficiency during PCM charging and discharging. Increasing the t/L ratio improves peak liquid fraction, reduces dead length, and delays PCM discharge in both configurations, enhancing system energy and exergy efficiencies. In a SP flow system, optimizing t/L at 0.042 yields a peak liquid fraction of 0.928, a 92.28% dead length reduction, and a 2 h and 22 min delay for PCM discharge (base-case t/L ratio: 0.0182), achieving a highest discharging efficiency of 39.1%. For a DP flow system, the optimized t/L ratio of 0.058 results in a peak liquid fraction of 0.976 and a 1 hour and 34 min delay for PCM discharge, attaining the highest discharging efficiency of 63.34%. Moreover, an improvement in the energy payback time (EPBT) is observed for both SP and DP flow as the t/L is increased. For the DP flow, a minimum EPBT of 0.68 years (energy basis) and 6.55 years (exergy basis) is observed at a t/L ratio of 0.058. In terms of energy cost, SP flow reaches a minimum of Rs. 20.824 Rs/kWh at a t/L ratio of 0.042. For DP flow, the minimum energy cost is 13.033 Rs/kWh at a t/L ratio of 0.058, representing a noTable 37.42% improvement compared to SP flow. These findings underscore the critical role of optimizing system parameters, specifically the t/L ratio, for enhanced energy and exergy performance, and economic viability of SAH-PCM.