Social networks represent the social structure, which is composed of individuals having social interactions among them. The interactions between the units in a social network represent the relations of the various social contacts and aim at finding different individuals in that network, with similar interests. It is a challenging problem to detect the social interactions between individuals with comparable considerations and desires from a large social network, which can be termed as community detection. Detection of the communities from social networks has been done by other authors previously, and many community identification algorithms were also proposed, but those communities' identification has been achieved on the online available data sets. The proposed algorithm in this paper has been named as Average Degree Newman Girvan (ADNG) algorithm, which can easily identify the communities from the real-time data sets, collected from the social network websites. The approach presented here is based on first determining the average degree of the network graph and then identifying the communities using the Newman Girvan algorithm. The proposed algorithm has been compared with four community detection algorithms, i.e., Leading eigenvector (LEC) algorithm, Fastgreedy (FG) algorithm, Leiden algorithm and Kernighan-Lin (KL) algorithm based on a few metric functions. This algorithm helps to detect communities for different domains, like for any proposed government policy, online shopping products, newly launched products in a market, etc.