To construct and validate prediction formulae of sagittal alignment in thoracolumbar kyphosis secondary to ankylosing spondylitis (AS) after osteotomy. A total of 115 AS patients who suffered from thoracolumbar kyphosis and underwent osteotomy were enrolled, with 85 patients in derivation group and 30 patients in validation group. Radiographic parameters were measured on lateral radiographs, including thoracic kyphosis, lumbar lordosis (LL), T1 pelvic angel (TPA), sagittal vertical axis (SVA), osteotomized vertebral angle, pelvic incidence (PI), pelvic tilt (PT), sacral slope (SS), and PI and LL mismatch (PI-LL). Prediction formulae of SS, PT, TPA and SVA were established; and their effectiveness was evaluated. There was no significant difference in baseline characteristics between the two groups (p> 0.05). In derivation group, LL and PI-LL were correlated with SS, and were then used to establish the prediction formula of SS[SS = − 12.791–0.765 × (LL) + 0.357 × (PI-LL), R2= 68.3%]; PI and PI-LL were correlated with PT, and the prediction formula of PT were thus established[PT = 12.108 + 0.402 × (PI-LL) + 0.252 × (PI), R2= 56.8%]; PT, PI-LL and LL were correlated with TPA, and were used to establish the prediction formula of TPA[TPA = 0.225 + 0.597 × (PT) + 0.464 × (PI-LL)-0.161 × (LL), R2= 87.4%]; PT, PI-LL and age were correlated with SVA, and were used to establish the prediction formula of SVA[SVA = 36.157 + 2.790 × (PI-LL) + 1.657 × (Age)-1.813 × (PT), R2= 41.5%]. In validation group, the predictive SS, PT, TPA and SVA were basically consistent with corresponding real values; and the mean error between predictive values and real values was of 1.3° in SS, 1.2° in PT, 1.1° in TPA and 8.6 mm in SVA. Postoperative SS, PT, TPA and SVA could be predicted with PI and the planned LL and PI-LL using prediction formulae, providing a method for AS kyphosis to plan postoperative sagittal alignment. Change of pelvic posture after osteotomy was quantitatively evaluated using the formulae.