If X is a geodesic metric space and x1,x2,x3∈X, a geodesic triangle T={x1,x2,x3} is the union of the three geodesics [x1x2], [x2x3] and [x3x1] in X. The space X is δ-hyperbolic (in the Gromov sense) if any geodesic side of T is contained in a δ-neighborhood of the union of the two other geodesic sides, for every geodesic triangle T in X. We denote by δ(X) the sharpest hyperbolicity constant of X, i.e. δ(X):=inf{δ≥0:X is δ-hyperbolic}. In this paper we prove that in order to compute the hyperbolicity constant in a graph with edges of the same length, it suffices to consider geodesic triangles such that the three points determining those triangles are vertices of the graph or midpoints of edges of the graph. By using this result we prove that the hyperbolicity constant of a graph with edges of length k is a multiple of k/4.