The growing rate of gated communities and limited residential rooftop solar provide opportunity for peer-to-peer (P2P) solar energy sharing among the residents. The very first and utmost requirement for a resident is to know the base rate, above which the energy could be sold for getting profit. To calculate the base rate, the present work develops the levelized cost of electricity (LCOE) of 5kWp rooftop solar system by considering all the design factors including geographical location and other costs related to installation, operation maintenance. As the geographical parameters effecting solar generation changes with location, the P2P minimum energy cost also varies. In order to study the effect of different locations, a simulation is carried out in system advisory model (SAM) software for 25 districts of Telangana state. With changes in unit rate, the model determines the base price to choose a tariff for residents to sell their solar energy in a P2P energy market. A case study of P2P energy transaction for 35 homes in a gated community is made and profit is calculated for PV and non-PV investors. This study calculates minimum price of selling solar units and it's respective profits which motivate investors and non-investors to engage in P2P energy trading. It also helps the policymakers to derive new policy required for P2P energy trading and for distribution companies to fix unit rate of feed-in-tariff (FIT). © 2021 IEEE.