We present a general framework for the calculation of soft functions for SCET_I observables through next-to-next-to-leading order (NNLO) in the strong coupling constant. As an example of our formalism we show how it can be used to obtain the complete NNLO soft function for the -jettiness event shape variable. We present numerical results for two examples with phenomenological impact: the one-jettiness soft function for both electron-proton and proton-proton collisions.