# How do i add a sine trend line on calc?

I use 6.0.3 on a win10 pc and i wanna add a sine/cosine trend line. But i cant find it anywhere, if there is such thing. Plesase help me!

What is a sine/cosine trendline? Do you mean a sinus/cosine function fitting some existing data using a least squares fit?

yes exactly, english not my 1st language sorry. The thing is i miss some data thats why i want this to be a harmonic sine wave

To analyze data based on the idea they might allow for an approximative description by harmonic functions is a common proceeding. However, it’s very different from the approximations by trendlines based on internal usage of the LINEST() (and probably LOGEST()) functions with Charts.
I’m not well informed about the field. You may look for some terms containing the name ‘Fourier’ who was a French scientist and mathematician (around 1800) to whom the related mathematics is traced back.

Functions desrcibable (approximately) with the help of harmonic functions mostly contain contributions by more than one harmonic function. This is similar as with polynomial approximations, but more convoluted.
Every single harmonic contributor is described by three parameters: Frequency, Amplitude, and Phase.
If you are confident your specific function is extrremely simple, it should allow for an approximation with one single harmonic.
In this simple case you can use the ‘Solver’ coming packed with LibreOffice, to find values for the three mentioned parameters meeting the needs.
(You might also test triples of FAP estimated by yourself and checked with the help of the chart. LeastSquare isn’t a dogm, but a pragmatic concept, imo.)

On this occasion I had another look into the attached example, and found that the image of the solver dialog on the second sheet contaied a relevant error. I cannot remember the proable cause, but I can tell you that the field `Target cell` should contain the cell where the SUM of quadratic deviations is calculated. In the example this is cell \$J\$1 while the image wrongly shows \$E\$5. Sorry!