In this note, we study the relation between the existence of algebraic invariants and integrability for planar polynomial systems. It is proved, under certain genericity conditions, that if the sum of the degrees of the algebraic invariants exceeds the degree of the polynomial system by one, then the system is integrable.