I'm trying to fit a polynomial regression line to a set of data and I want to do it by hand instead of through a software package. I know that to estimate β in y = a + βx I use:

β = Σ( x- xbar)(y - ybar) / Σ(x - xbar)^2

But how can I estimate the β2 in y = a + β1x + β2x^2

Any help at all would be appreciated.