This study was to evaluate the interfractional and intrafractional setup errors and baseline shifts of golden fiducial markers in patients receiving postoperative radiotherapy (RT) using cone‐beam computed tomography (CBCT) in order to calculate PTV margins for patients with liver cancer. Twelve patients with liver tumors underwent postoperative RT. CBCT images were acquired before and after the treatment. Off‐line vertebral body match and fiducial marker match were used, respectively. The results of vertebral body match represented the setup errors of the patients, while the results of fiducial marker match represented the absolute position errors of the target volume. Baseline shifts of the target volume were calculated as the absolute target position errors minus setup errors. A total of 12 patients with 214 acquisitions of CBCTs were analyzed. Both Σ and σ of setup errors and baseline shifts in left–right (L/R), superior–inferior (S/I), and anterior–posterior(A/P) directions were calculated, including interfractional and intrafractional uncertainties. Planning target volume (PTV) margins were calculated according to margin=2.5Σ+0.7σ. Margins of 1.8 mm, 3.8 mm, and 1.4 mm in L/R, S/I, and A/P directions are needed to compensate intrafractional errors when daily online CBCT correction is used. When CBCT correction with no action level (NAL) protocol is used, PTV margin should be 2.6 mm, 5.9 mm, and 2.6 mm in L/R, S/I, and A/P directions. Margins of 5.5 mm, 14.6 mm, and 7.2 mm were needed to compensate the baseline shifts when electronic portal imaging devices (EPID) or CBCT with bone match is used for online correction of setup error.PACS number: 87.55.‐x