Recent research has focused on the design and sizing of standalone photovoltaic systems. Unfortunately, due to highly fluctuating levels of solar energy and the power supply generated not coinciding with energy demand, high capacity of generation and energy storage systems are required to provide a highly reliable supply. However, a highly reliable system tends to produce high excess energy which needs to be discarded as a dump load, which is proving to be a major concern. For this reason, this paper proposes to use the excess energy for hydrogen production, which will then be sold to local consumers. This paper presents a comparison of optimization design and economic analysis of a standalone photovoltaic with a battery system and a standalone photovoltaic with battery-hydrogen production system using an iterative technique. For the feasibility study of the standalone photovoltaic with a battery and with a hydrogen production system, the proposed minimum hydrogen-selling price is determined by breakeven analysis and is compared to the past references’ hydrogen-selling prices and gasoline prices.