http://www.practical-home-theater-guide.com/Tv-viewing-distance.html
The '2-to-5' Principle
For optimum TV viewing distance, the nearest seating position should be limited to approximately twice the screen width (more precise 1.54 times the screen width); the furthest distance should being no more than five times the width of your screen.
That's pretty much in line with what I found online. Here's the formulas.
Calculating the optimal seating distance using screen size
* For standard televisions (4:3 aspect ratio, 480i signal)
Multiply the diagonal measurement (in inches) by 4.3.
* For HDTV (16:9 aspect ratio, 1080i signal)
Multiply the screen diagonal measurement (again, in inches) by 1.57.
Calculating the optimal diagonal screen size using the seating distance
* For standard televisions (4:3 aspect ratio, 480i signal)
Divide the distance you sit from your television (in inches) by 4.3.
* For HDTV (16:9 aspect ratio, 1080i signal)
Divide the distance you sit from your television (in inches) by 1.57.
However, for our great room I would need a 130" screen to be optimal.