# How to find polynomial trendline x value when using a date?

So I have a chart that I have created in Numbers, with a trendline using a polynomial function, and I've got it to display the formula, but I cannot for the life of me, figure out what `x` value I'm supposed to use to get the resulting `y` value!

`x` is a date / time, so clearly it must be something related to the date value. But I've tried using ms since the unix epoch, secs since the unix epoch, etc. each to no avail. Some "other" spreadsheet tools make it clear how they convert dates into numbers when creating polynomial trendlines, Numbers however, does not.

Does anyone know what the hell value I am supposed to use!?

For those that might not be able to read the graph easily, an `x` value of 01/01/2019 00:00:00 should give a `y` value of 1,000~.

• If your question is not related to Numbers but trend fitting in general, try Cross Validated. Commented Apr 13, 2018 at 7:35
• @IconDaemon my question relates directly to Numbers, as it's how Numbers is calculating the x value when it's a date, that is the basis for my entire question. Commented Apr 13, 2018 at 8:34

## 1 Answer

My guess is `x` is the number of seconds since some particular time in 1998 or 1999.

If I put 644,430,371 in the formula, I get 1000, and 2019-01-01 is 644,430,371 seconds after 1998-08-01.

If I put 658,332,729 in the formula, I get 4000, and 2020-01-01 is 658,332,729 seconds after 1999-02-21.

The dates might not match exactly because the limited number of digits of precision in the formula is introducing some rounding errors.