I believe the “avg rate” calculation is correct (for what it is calculating.)
It’s probably not what anyone wants or expects though.
It’s showing the average rate at the goal date, which in your case is 2020-08-06 so if you keep your rate at 40/day for the next 5 or so years that will be what your average rate will have been.
Heart and add your opinion to this post about better goal stats info and we can maybe get some improvements made.