Abstract Infrared search and track (IRST) systems have attracted more attention in recent years due to advances of infrared imaging technology. In a typical IRST system, small infrared detection algorithm is the most challenging part of the system development procedure. In this paper, an effective algorithm based on the average absolute gray difference (AAGD) is presented. In the first step, the main deficiencies of the AAGD algorithm are investigated precisely. After identifying three major drawbacks of the AAGD algorithm, a powerful small target detection algorithm is developed through compensating every single weak-spot in the AAGD algorithm. The simulation results on real infrared images prove that the proposed algorithm not only compensates the AAGD disadvantages but also outperforms the recently published well-known small infrared target detection algorithms in both qualitative and quantitative perspectives.