Purpose: The aim of this study is to calculate setup margin based on six-dimensional (6D) corrected residual positional errors from kV cone beam computed tomography (CBCT) and from intrafraction projection kV imaging in coplanar and in noncoplanar couch positions in stereotactic radiotherapy. Methods: Six dimensional positional corrections were carried out before patient treatments, using a robotic couch and CBCT matching. A CBCT and stereoscopic ExacTrac image were acquired posttable position correction. Further, a series of intrafraction ExacTrac images were obtained for the variable couch position. Translational and rotational errors were identified as lateral (X), longitudinal (Y), vertical (Z); roll (Ɵ°), pitch (Φ°) and yaw (Ψ°). A total of 699 intrafraction image sets (361 coplanar and 338 noncoplanar) for 51 SRS/SRT patients were analysed. Rotational errors were corrected in terms of translational coordinates. Residual set-up margins were calculated from CBCT shifts. ExacTrac shifts give residual + intrafraction setup margins as a function of coplanar and noncoplanar couch positions. Results: The average residual positional error obtained from CBCT in X, Y, Z, Ɵ, Φ, Ψ were 0.1 AE 0.4 mm, 0.0 AE 0.6 mm, 0.0 AE 0.5 mm, 0.2 AE 0.8°, 0.1 AE 0.6°and À0.1 AE 0.7°respectively. For ExacTrac, the shits were À0.5 AE 0.9 mm, À0.0 AE 1mm, À0.6 AE 1.0mm, 0.4 AE 0.9°, À0.2 AE 0.6°, and À0.0 AE 0.8°.CBCT calculated linear setup margins in X, Y, Z direction were 0.5, 1.2, and 1 mm respectively. ExacTrac yielded coplanar and noncoplanar linear setup margins were 1.2, 1.3, 1.5, 1.4, 1.5, and 2.1 mm respectively. Conclusion: CBCT-based gross residual set-up margin is equal to 1 mm. ExacTrac calculated residual plus intrafraction setup margin falls within a 2 mm range; attributed to intrafraction patient movement, table position inaccuracies, and poor image fusion in noncoplanar geometry. There could be variations in the required additional margin between centers and between machines, which require further studies.