Heuristic methods are problem solving methods. In general, they obtain near-optimal solutions, and they do not take the care of provability of this case. The heuristic methods do not guarantee to obtain the optimal results; however, they guarantee to obtain near-optimal solutions in considerable time. In this paper, an application was performed by using firefly algorithm - one of the heuristic methods. The golden ratio was applied to different steps of firefly algorithm and different parameters of firefly algorithm to develop a new algorithm - called Firefly Algorithm with Golden Ratio (FAGR). It was shown that the golden ratio made firefly algorithm be superior to the firefly algorithm without golden ratio. At this aim, the developed algorithm was applied to WBCD database (breast cancer database) to cluster data obtained from breast cancer patients. The highest obtained success rate among all executions is 96% and the highest obtained average success rate in all executions is 94.5%.