Until recently, there has been no single, explicit equation that explains how force between identical permanent magnets varies with distance over any distance. Typically, observation data is fitted using two curve segments: at large and small distances. In this work, we derive a general equation to determine the force between identical cylindrical permanent magnets at any distance with the help of the WolframAlpha application to get the explicit form of an integral problem introduced by Vokoun et al. (J. Magn. Magn. Mater. 321 3758–63, 2009) that appears to have no analytical solution. The resulting equation accurately fits observational data and can be used to estimate the magnetization of permanent magnets.