The precise estimation of Rate Of Change Of Frequencies (ROCOFs) in a generation trip event can be helpful on power system inertia estimation, fast system response, and accurate event capturing. However, the ROCOF estimations from the existing Synchronized Measurement Devices (SMDs) are usually simply calculated by the finite difference between two adjacent frequency measurement points. The ineluctable noises, disturbances, and spikes from real-world frequency measurements can bring large dynamics to the ROCOF estimation and thus can result in an inaccurate estimation of the initial ROCOF. This issue becomes more serious when the target power grid has low inertia and a large amount of distributed energy sources are deployed. To address this issue, a precise ROCOF estimation algorithm is designed based on least square method with flexible window size. In addition, a median filter is also designed and applied on the frequency measurements before using the proposed algorithm. The window size and thresholds in the proposed algorithm are determined with historical event data analysis. The proposed algorithm is deployed in a low cost, flexible, and distribution level universal grid analyzer (UGA) platform. Multiple experiments are conducted in both a laboratory and the Hawaiian Islands to verify the effectiveness of the proposed algorithm.