Off-grid electricity generation using renewable energy technologies has become a more reliable source to fulfill the needs of rural areas at limited level without considering conventional resources. The main purpose of this study was to propose an economical and optimized design for electricity generation using hybrid energy source PV/Biomass for an agricultural farm and a residential community centered in a small village of district Layyah in the Punjab province of Pakistan. The electric load data was collected for the irrigation and residential needs. Hybrid Optimization Model for Electric Renewable (HOMER) was used to design and perform techno-economic analysis to meet the load requirements using PV/biomass hybrid configuration. The solar irradiance data and the available biomass potential on the farm was used in the HOMER software to perform the analysis. Total net present cost (NPC) and cost of electricity (COE) were obtained as a solution by the HOMER analysis and then these results were refined further by performing sensitivity analysis. Sensitivity parameter such as biomass potential, biomass price, solar irradiance and variations in loads were used in the sensitivity analysis. This analysis compares the performance of the system and shows that system is techno-economically viable based on the net present cost and cost of energy.