Using thermal energy storage such as phase change materials (PCMs) is a suitable solution to reduce energy consumption in order to maintain thermal comfort conditions inside the building. There is a wide range of phase change materials according to their different characteristics such as melting temperature, freezing temperature, latent heat capacity, specific heat value of solid and liquid phase, thermal conductivity coefficient, and charge and discharge range, which makes it difficult to choose the right PCM. In this research, two common groups of phase change materials that are used commercially are studied and after performing a sensitivity analysis on them, a suitable temperature range is selected. Then the selected PCMs are placed in different parts of the external envelopes of the building and various parameters such as air conditioning system energy consumption, thermal comfort, heat balance, etc. are examined. It should be noted that in this study, the use of PCMs in buildings with cooling and heating systems is investigated. In order to carry out the simulation, a two-story office building located in Arak, Iran was modeled in Design Builder software along with all the details. The outputs show that if Bio PCM is used in the outer layer of the wall in the summer season, it is possible to save up to 154 w/m2 in the energy required for cooling the building. While the use of Bio PCM M91 Q21 material in the inner layer of the wall will reduce the load of the cooling system by 246.15 Wh/m2. Also, if RT PCM is used, it is possible to reduce the heat load by 80%. Furthermore, by analyzing the optimal cases, it can be concluded that increasing the thickness of the PCM layer cannot effectively improve the thermal performance of the building. On the contrary, their reduction in some cases leads to a reduction in energy demand in the building. Finally, in order to generalize the results, the optimal situation was compared with two similar climates of Arak city.