Link prediction in social network is an important topic due to its applications like finding collaborations and recommending friends. Among existing link prediction methods, similarity-based approaches are found to be most effective since they examine the number of common neighbours (CN). Current work presents a novel link prediction algorithm based on particle swarm optimization (PSO) and implemented on four real world datasets namely, Zachary’s karate club (ZKC), bottlenose dolphin network (BDN), college football network (CFN) and Krebs’ books on American politics (KBAP). It consists of three experiments: i) to find the measures on existing methods and compare them with our proposed algorithm; ii) to find the measured values of the existing methods along with our proposed one to determine future links among nodes that have no CN; and iii) to find the measures of the methods to determine future links among nodes having same number of CN. In experiment 1, our proposed approach achieved 75.88%, 78.34%, 82.63% and 78.36% accuracy for ZKC, BDN, CFN, and KBAP respectively. These results beat the performances of traditional algorithms. In experiment 2, the accuracies are found as 75.53%, 74.25%, 81.63% and 78.34% respectively. In experiment 3, accuracies are detected as 72.75%, 81.53%, 78.35% and 75.13% respectively.