Hexagonal rings are critical to the properties of many nanomaterials by determining their mechanical strength, thermal stability, and electrical conductivity, therefore this kind of structure has been intensively concerned in computational studies. However, existing molecular dynamics (MD) simulation tools lack specialized functions for identifying and characterizing them. To address this gap, we developed HexagonRingCalculator, a tool for identifying hexagonal rings and calculating their geometric properties, including bond lengths, ring area, and circularity, directly from MD simulation data. The code facilitates the analysis of ring deformation under varying conditions, such as temperature changes. We demonstrate its functionality and accuracy through classic and ab initio MD simulations of graphene and cellulose, highlighting its potential to advance computational studies in nanomaterials.