This document proposes a new method for denoising ultrasound images using an optimal non-local means (nl-means) algorithm, which improves upon the original by calculating the mean distance of pixel neighborhoods instead of summing total distances. The proposed method demonstrates enhanced performance in noise reduction, image visibility, and edge detection compared to existing nl-means algorithms. Results indicate that the new approach produces better visual quality and lower mean square error metrics, making it suitable for clinical applications.