Your visual acuity, the background (contrast), the aspect (relative size) and the amount of moisture in the atmosphere (transmissivity) affect the distance. I've seen a fighter (airframe, not contrails) in the beam at 20 miles - that's on a clear day, good contrast with 20/10 eyesight.
Extrapolating for size, that's close to 100 miles for a 747, if you we're looking at planform/beam aspect. When an airplane is nose on, it's a far smaller target than when you see it from abeam or from below. On a hazy day, a 737 nose on can be hard to see at 5 miles against a cluttered background....