This paper deals with the iterative algorithm and the implementation of the spectral discretization of time-dependent Navier–Stokes equations in dimensions two and three. We present a variational formulation, which includes three independent unknowns: the vorticity, velocity, and pressure. In dimension two, we establish an optimal error estimate for the three unknowns. The discretization is deduced from the implicit Euler scheme in time and spectral methods in space. We present a matrix linear system and some numerical tests, which are in perfect concordance with the analysis.