We derive constraints on cosmological parameters using the power spectrum of galaxy clustering measured from the final two-degree field galaxy redshift survey ( 2dFGRS ) and a compilation of measurements of the temperature power spectrum and temperature-polarization cross-correlation of the cosmic microwave background radiation . We analyse a range of parameter sets and priors , allowing for massive neutrinos , curvature , tensors and general dark energy models . In all cases , the combination of datasets tightens the constraints , with the most dramatic improvements found for the density of dark matter and the energy-density of dark energy . If we assume a flat universe , we find a matter density parameter of \Omega _ { m } = 0.237 \pm 0.020 , a baryon density parameter of \Omega _ { b } = 0.041 \pm 0.002 , a Hubble constant of H _ { 0 } = 74 \pm 2 { kms } ^ { -1 } { Mpc } ^ { -1 } , a linear theory matter fluctuation amplitude of \sigma _ { 8 } = 0.77 \pm 0.05 and a scalar spectral index of n _ { s } = 0.954 \pm 0.023 ( all errors show the 68 % interval ) . Our estimate of n _ { s } is only marginally consistent with the scale invariant value n _ { s } = 1 ; this spectrum is formally excluded at the 95 \% confidence level . However , the detection of a tilt in the spectrum is sensitive to the choice of parameter space . If we allow the equation of state of the dark energy to float , we find w _ { DE } = -0.85 _ { -0.17 } ^ { +0.18 } , consistent with a cosmological constant . We also place new limits on the mass fraction of massive neutrinos : f _ { \nu } < 0.105 at the 95 % level , corresponding to \sum m _ { \nu } < 1.2 eV .