The maximum size of a cosmic structure is given by the maximum turnaround radius – the scale where the attraction due to its mass is balanced by the repulsion due to dark energy . We derive generic formulae for the estimation of the maximum turnaround radius in any theory of gravity obeying the Einstein equivalence principle , in two situations : on a spherically symmetric spacetime and on a perturbed Friedman-Robertson-Walker spacetime . We show that the two formulae agree . As an application of our formula , we calculate the maximum turnaround radius in the case of the Brans-Dicke theory of gravity . We find that for this theory , such maximum sizes always lie above the \Lambda CDM value , by a factor 1 + \frac { 1 } { 3 \omega } , where \omega \gg 1 is the Brans-Dicke parameter , implying consistency of the theory with current data .