Butterflies are insects that have aesthetic beauty and are also important assets in the field of nature protection. In nature, butterflies have a crucial role in maintaining ecosystems, especially in the process of pollination of flowering plants which contributes to the natural propagation of plants. Butterfly wings have an important role in identifying butterfly species based on size, shape and color. In mathematics, there is the concept of fractals which is a very suitable method for modeling natural phenomena and used as a tool to represent natural objects. In this study, a classification of butterfly species was carried out based on the shape of the butterfly's wings. A total of 100 butterfly images were used in this study, the first step was to convert the RGB images to grayscale and then segment the butterfly wings. The area is then used to identify butterfly wing type patterns using edge detection using the Canny method. Furthermore, by using the fractal box counting method, the resulting dimensional values are used in the clustering process. The results of the dimension values will be classified using the K-Means grouping method with five groups, namely Adonis Butterfly, Julia Butterfly, Brown Siproeta Butterfly, Metal Marks Butterfly, and African Giant Swallowtail Butterfly, showing an accuracy of 89%.