The study aims to estimate the amount and cost of hydrogen and oxygen that can be produced in the Al-Jufra region (Libya) using photovoltaic panels (PV). The electricity generated by PV is used to power the proton exchange membrane (PEM) electrolyzer. Through the study, the thermal efficiency of the system is calculated, as well as the factors affecting it. The amount of solar radiation that the region receives during the year is also determined, amounting to 81.72 kW/year m2, with a duration of 3421 daylight hours. With this radiation value, it is possible to produce 1272 and 636 mol/year m2 of hydrogen and oxygen, respectively, at an estimated cost of $1.42 per mole. Thermodynamic analysis of PV cells and electrolyzer shows that the electrical efficiency and exergy efficiency of PV cells are 4.8% and 5%, respectively, and vary according to the radiation intensity. The exergy and energy efficiency of the analyzer remained constant at 48% and 39%, respectively, according to the aforementioned arrangement. The decrease in the efficiency of PV energy efficiency affects the overall efficiency of the system and does not exceed 3% in ideal conditions. In addition, the expected cost in 2030 is estimated and found to be 5.77% lower than its current price. Comparing the amount and price of production in the Al-Jufra area with other areas in Libya, it becomes clear that the city of Al-Kufra has a 20% higher annual production amount.