Abstract With the ever-increasing need for concealing messages within cover media like image, video, and audio, numerous attempts have been developed for steganography. Most of the steganographic techniques perform their embedding operation on the cover image without selecting a better location. The right selection of location for embedding the information can lead to high imperceptibility and robustness. Accordingly, in this paper, we develop a new cost function for estimating the cost of every pixel to identify the good location to embed the message data. The proposed cost estimation procedure utilizes multiple parameters like wavelet coefficient, edge transformation, and pixel intensity. The proposed cost matrix is then utilized to embed the message data into the cover media using an embedding integer. The proposed steganographic technique is experimented with two magnetic resonance brain images, and the results are analyzed with the peak-to-peak signal-to-noise ratio (PSNR) and mean square error. The robustness analysis ensured that the proposed steganographic technique outperforms the existing methods by reaching the maximum PSNR of 72.74 dB.