Countdown to reach point of "Return of Invest"

I have my data (solarpanel energy harvesting) stored inside InfluxDB.
I want to calculate a countdown based on

Invested $200 at Day 01.01.2020
Average Energy haverst per DAY in the last 4 month =XXX
assuming the futre days/weeks/… will be the same, how many days/weeks/… are left until the payment will be returned?

how can this be done? Hope to get help (grafana 7.4 is the version i use)
Thanks a lot