What is the faintest magnitude a telescope can see? This website claims:


  The space telescope can detect objects as faint as 31st magnitude...


It's referring to Hubble, but does not cite any source or math. How do you calculate the faintest (apparent) magnitude that a space telescope can detect?
This is a term known at the limiting magnitude. This term refers simply to the faintest apparent magnitude your instrument can detect. Wikipedia has an article describing limiting magnitude.  I pulled the info from there.

The wiki article begins off explaining the basic way of finding limiting magnitude. 

$$5 \cdot \log_{10}\left(\frac{D_1}{D_0}\right) $$

Now, if we simply plug in some values, 254 mm telescope and assuming the eye is 6 mm, we get an answer of 8.13.  This can be rounded to nearest base and we can say that it increases the magnitude by 8.  

The article goes into more description about the contrast of the given medium. With Earth, we have the atmosphere, lights, and pollution to worry about. The more you are able to reduce these effects, the better. That's why for telescopes at observatories, we place them in high places, usually away from populated areas to help reduce these worrisome effects. This helps increase the contrast between the object you are looking at and its medium (in astronomy the night sky).

In the article it explains this with the formula below:

$$m \cdot v = m_{nakedeye} - 2 + 2.5 \cdot \log_{10}(D \cdot P \cdot t)$$


$D$ = objective or main mirror diameter in mm
$P$ = power or magnification
$t$ = transmission factor, usually 0.85–0.9


Simply putting in our values from above and estimating a 10" telescope has a 250x magnification with a transmission factor of 0.85, we get how the wiki article states that the answer of a 10" telescope easily getting a magnitude 15 is possible.

Now for observational laboratories and something like the Hubble telescope, they use additional factors, including image processing mechanisms that help reduce noise in the image and integration time of the object you are viewing.  This means using a sensor that can capture the image at low light levels AND while it moves.

If you really want to know more, go here. This link actually explains in very technical detail the technology behind the imaging discovery efficiency.  Basically, it helps boost the limiting magnitude to detect extremely faint objects.