Increasing demand due to the technological advancements and population expansion poses some issues in terms of environmental considerations and establishment of a sustainable market structure. In this context, the role of Peer-to-Peer (P2P) energy trading in system operation is examined in this paper under different case studies with four prosumer models which have different Energy Storage Systems (ESS), Photovoltaic (PV) systems and responsive demand such as Electric Vehicle (EV), and economic analysis is performed using the developed interface. An active market structure is created with an energy management system where energy can be bought and sold both through the P2P market operator and the distribution system operator, depending on the pricing in different time periods for household models. Through the use of mathematical modeling based on MILP, an optimal solution with the lowest possible cost is achieved amongst the parties. In this study, the amount of traded energy is observed according to both households and time indices with different domestic models and developed an optimization technique. The realization of bidirectional energy transfer of EVs, the importance of ESS, PV system and different domestic cases in terms of P2P energy trading is also examined. Additionally, the system's benefits are demonstrated in advance to participants by verifying and visualizing the data via a system that accepts these cases as input and output. (C) 2021 Published by Elsevier Ltd.