Say we have data in columns A and B like:
To do a linear trend we need a slope and intercept. In D2 enter:
=SLOPE(B2:B20,A2:A20)
and in E2 enter:
=INTERCEPT(B2:B20,A2:A20)
There are equally simple formulas to get the parameters of other non-linear fits such as higher order polynomials, etc.