Complex bands k(E) in a semiconductor crystal, along a general direction n, can be computed by casting Schrödingers equation as a generalized polynomial eigenvalue problem. When working with primitive lattice vectors, the order of this eigenvalue problem can grow large for arbitrary n. It is, however, possible to always choose a set of non-primitive lattice vectors such that the eigenvalue problem is restricted to be quadratic. The complex bands so obtained need to be unfolded onto the primitive Brillouin zone. In this paper, we present a unified method to unfold real and complex bands. Our method ensures that the measure associated with the projections of the non-primary wavefunction onto all candidate primary wavefunctions is invariant with respect to the energy E. © 2012 IOP Publishing Ltd.