Unipolar atrial fibrillation (AF) electrograms (EGMs) require far-field ventricle cancellation to recover hidden atrial activations. Current methods cannot achieve real-time cancellation because of the temporal delay they introduce. We propose a new real-time ventricular cancellation (RVC) method based on causal implementation optimized for real-time functioning. The method is similar to the classical average beat subtraction (ABS) method but it computes the ventricular contribution before the ventricular activation finishes. We compare the proposed method to the ABS on synthetic and real EGM databases for the time and frequency domains. All parameters and their optimal values are analyzed and validated. The RVC method provides a good reconstruction of the unipolar EGMs and a better local activation time detection than the classical approach with average F1scores 0.7307 and 0.7125, respectively. The spectral analysis shows that the average power after ventricular cancellation is reduced for frequency bands between 3 and 5.5 Hz, demonstrating that the proposed method removes the ventricular component present in the unipolar EGM signals compared to the ABS method. The phase mapping analysis on the RVC method presented lower error when comparing the annotated EGM cycles with the phase inversion intervals. In terms of performance ABS and RVC behave similarly, but the real-time capability of the latter justifies its preference over the offline implementations. In the clinical environment other online investigations, e.g., rotational activity assessment, dominant frequency or local activation time mapping, might benefit from the real-time potential of the proposed cancellation method.