Objective: The objective of this study was to calculate the direct costs of postoperative atrial fibrillation (POAF) in a high-complexity cardiovascular hospital. Methods: We performed a cost analysis with a pairwise-matched design. Twenty-two patients with POAF and 22 patients without this complication were included. Pair-matching was performed (1:1) based on the following criteria: identical type of surgery, similar EuroSCORE II values, and absence of any other postoperative complication. Results: The total hospital cost was significantly higher in the POAF group than in the non-POAF group (US$ 10,880 [± 2,688] vs. US$ 8,856 [± 1,782], respectively, for each patient; P=0.005). This difference was attributable to postoperative costs (US$ 3,103 [± 1,552] vs. US$ 1,238 [± 429]; P=0.0001) for patients with or without POAF, respectively. The median postoperative lengths of stay were 9 (range 5-17) and 5 (3-9) days for patients with and without POAF (P=0.032), respectively. Preoperatively, no differences were found in the EuroSCORE II values (median 1.7 vs. 1.6, respectively; P=0.91) or direct costs (US$ 1,127 vs. US$ 1,063, respectively; P=0.56) between POAF and non-POAF groups. Conclusion: POAF generates a high economic burden in the overall costs of cardiac surgery, and our results reveal the differential contribution of each of the evaluated factors. This information, which was previously unavailable in this setting, is essential for the development of more effective prevention strategies.