Curves of genus g which admit a map to CP1 with specified ramification profile mu over 0 and nu over infinity define a double ramification cycle DR_g(mu,nu) on the moduli space of curves. The study of the restrictions of these cycles to the moduli of nonsingular curves is a classical topic. In 2003, Hain calculated the cycles for curves of compact type. We study here double ramification cycles on the moduli space of Deligne-Mumford stable curves. The cycle DR_g(mu,nu) for stable curves is defined via the virtual fundamental class of the moduli of stable maps to rubber. Our main result is the proof of an explicit formula for DR_g(mu,nu) in the tautological ring conjectured by Pixton in 2014. The formula expresses the double ramification cycle as a sum over stable graphs (corresponding to strata classes) with summand equal to a product over markings and edges. The result answers a question of Eliashberg from 2001 and specializes to Hains formula in the compact type case. When mu and nu are both empty, the formula for double ramification cycles expresses the top Chern class lambda_g of the Hodge bundle of the moduli space of stable genus g curves as a push-forward of tautological classes supported on the divisor of nonseparating nodes. Applications to Hodge integral calculations are given.