The study aims to find the optimal fin length distribution for improved heat transfer during melting and solidification in a tubular phase change material (PCM) heat exchanger (HE) designed for heat storage. Three types of horizontal PCM tabular HEs, all with five longitudinal fins, were studied numerically. While maintaining a constant heat‐transfer area, each model depicts a unique fin length distribution design. The first model, which serves as the reference design, has a uniform fin length distribution and each fi\n is 30 mm long. The second model has shorter upper and side fins and longer lower fins. The third model has long lower fins but shorter than that of the second model, with short side fins and no change in upper fin length with reference design. The findings indicate that the second model exhibits the best heat‐transfer performance for the melting process, while the first model is most effective for solidification. Interestingly, the third design emerges as the optimum choice for both melting and solidification processes, where for 1 h of melting operation, results obtained 87%, 92%, and 90% for three models, respectively, from the first uniform model to the third model. While for 2 h of solidification the result obtained 11%, 17%, and 13% liquid fraction for the three models, respectively.