Triple phase grating X-ray interferometry is a promising new technique of grating based X-ray differential phase contrast imaging. Accurate retrieval of sample phase gradients from measured interference fringe shifts is a key task in X-ray interferometry. To fulfill this task in triple phase grating X-ray interferometry with monochromatic X-ray sources, the authors derived exact formulas relating sample phase gradient to fringe phase shift. These formulas not only provide a design optimization tool for triple phase grating interferometry, but also lay a foundation for quantitative phase contrast imaging.