Our research is based is to create implementations of two common clustering algorithms K-Means and Affinity Propagation. There are certain drawbacks of K-Means however the main drawback with this and the same kind of similar algorithms is in selecting some number of clusters, and choosing the initial set of points. Affinity Propagation locates exemplars between datum or data points or series points and thus forms clusters of this datum around these exemplars. After forming the groups it operates by simultaneously considering all d atum as probable exemplars and interchange messages between data points till a good set of exemplars and clusters appears. Finally, we have finish making an Affinity Propagation program which nearly supervene the details laid out because the affinity propagation has an aptness to form many clusters. Using these two programs we slandered a variety of one and two dimensional datasets, and we examined the results to confirm that Affinity Propagation produces clustering errors in involving competition with that of K-Means in an order of enormity less time.