How to calculate a multiple regression in calc?

I have three, possibly four, independent variables, and one dependant variable. What is the best way to calculate their multiple regression please? Has anyone created a template for this yet? Thanks.

You may search for “how to use linest for multiple regression”. Most results will refer to Excel. Don’t worry. Mathematics behind the LINEST function is most likely the same.
If you are interested to get an insight you can start reading the subchapter
6.18.41 LINEST of OpenDocument-v1.2-part2.
Specialise to the case Y : 1 column, X : multiple columns; equal number of rows.