Traffic congestion is a problem that often occurs at crossroads. One of the causes of congestion is the waiting time for traffic at a crossroad improper, so it can cause the accumulation of vehicles in several branches. The purpose of this paper is to determine the optimal waiting time for traffic lights at the Sudirman-Pujowiyoto intersection in Purbalingga by using a compatible graph. The traffic flow at the intersection can be modeled into a compatible graph, where a vertex represents the traffic flow to be managed and the edges indicate that the two flows are compatible. It means that they can run simultaneously without crossing. Based on secondary data from Dinas Perhubungan Kabupaten Purbalingga, the total waiting time applied to the Sudirman-Pujowiyoto intersection is 317 seconds. Meanwhile, according to the compatible graph calculation, by using the assumption of 60 seconds in a cycle, an optimal total waiting time is 120 seconds.