A lot of anime set in the distant future doesn't specify the calendar year, so it ends up with something like "Before the..." or "XX years ago".
Some of the future-themed anime such as Gundam and Dragon Ball have their own calendar era which is Universal Century and Age respectively. We can't convert or compare the alternate calendar of the Anime to our real-life Gregorian calendar, so it might be helpful if the Anime has a similar calendar to ours.
According to my research, Legend of the Galactic Heroes is the anime that is set in the most distant future as of today, in AD 2801.