A problem of distinguishing science fiction from fantasy using as a basis the closeness of the fiction to an actual possible reality is that most fiction itself is very unreal based on the probability of the described story. Where is the line to be drawn?
This is why I tend to think not in terms of "closeness to possible reality" so much as "source of the fictional reality". If the source of the reality is modern science, however far it is logically extrapolated, and the solutions to the problems that thus arise are within that same realm, it would seem more likely to be science fiction to me.
Thus, you can have low-magic fantasy that is rather close to our Medieval reality but is still fantasy, and have far-future science fiction, where society has gone off to left field, but still be science fiction.