Passive radio frequency identification (RFID) is a low cost and low complexity localization technology. With introduction of reference tags, RFID technology can provide on-line reference information for pattern matching localization algorithms. One of the most popular algorithms is $k$ -nearest neighbor algorithm. While how to decide the $K$ value in estimation is still a problem. In addition, traditional received signal strength indicator (RSSI)-based algorithms suffer from multipath effects, it is difficult to further improve the localization accuracy. In this paper, we analyze the similarity of backscatter signals and present a novel range based indoor localization method, SAIL. According to the propagation distances of signals, reference tags that have similar distances to a reader antenna can be considered as a group. Inspired by the idea of grouping, clustering algorithm is utilized to get candidate tags for ranging. This method does not need to fix the number of reference tags in estimation. Besides RSSI, the RFID reader can also extract phase of signals coming from backscattered signals of responding tags. This guides us to combine RSSI and phase in similarity measure for clustering. In the simulation and experimental tests, SAIL is superior to other RFID schemes considering cost, location estimation error, and flexibility.