Assume that Γ is a connected negative definite plumbing graph, and that the associated plumbed 3–manifold M is a rational homology sphere. We provide two new combinatorial formulae for the Seiberg–Witten invariant of M. The first one is the constant term of a ‘multivariable Hilbert polynomial’, it reflects in a conceptual way the structure of the graph Γ, and emphasizes the subtle parallelism between these topological invariants and the analytic invariants of normal surface singularities. The second formula realizes the Seiberg–Witten invariant as the normalized Euler characteristic of the lattice cohomology associated with Γ, supporting the conjectural connections between the Seiberg–Witten Floer homology, or the Heegaard–Floer homology, and the lattice cohomology.