I don't know how to calculate but Wikipedia has a page about it:
Timeline of the Universe
The galaxies in the Local Group, the cluster of galaxies which includes the Milky Way and the Andromeda Galaxy, are gravitationally bound to each other. It is expected that between 10^11 (100 billion) and 10^12 (1 trillion) years from now, their orbits will decay and the entire Local Group will merge into one large galaxy.
Assuming that dark energy continues to make the universe expand at an accelerating rate, in about 150 billion years all galaxies outside the Local Supercluster will pass behind the cosmological horizon. It will then be impossible for events in the Local Group to affect other galaxies. Similarly it will be impossible for events after 150 billion years, as seen by observers in distant galaxies, to affect events in the Local Group. However, an observer in the Local Supercluster will continue to see distant galaxies, but events they observe will become exponentially more red shifted as the galaxy approaches the horizon until time in the distant galaxy seems to stop. The observer in the Local Supercluster never observes events after 150 billion years in their local time, and eventually all light and background radiation lying outside the local supercluster will appear to blink out as light becomes so redshifted that its wavelength has become longer than the physical diameter of the horizon.
Technically, it will take an infinitely long time for all casual interaction between our local supercluster and this light; however, due to a the redshifting explained above, the light will not necessarily be observed fit an infinite amount of time, and after 150 billion years, no new causal interaction will be observed.
Therefore, after 150 billion years intergalactic transportation and communication beyond the Local Supercluster becomes causally impossible.
This wikipedia data, comes from here, which is used in the text as reference (4)