Interesting reading regarding clothes and their ability to block UV. This is not my article, I just found it.
The short answer is, it varies. The three factors that most influence the UV transmission factor of clothing are kind of obvious:
Material: Some materials are better at absorbing UV than others; for example, the paper cited below suggests that polyester absorbs more UV light (particularly UVB) than cotton.
Weave: The thicker and more tightly woven a piece of fabric is, the less light it lets through.
Color: Dyes work by absorbing various frequencies of visible light, and many of them will absorb UV too. Of course, high light absorption at visible frequencies doesn't necessarily imply high UV absorption, but as a general rule of thumb, white or lightly colored fabrics do tend to let more UV through than darker fabrics.
In addition, there are also "invisible dyes" that can absorb UV without darkening the visible color of the fabric. Some UV-absorbent laundry additives are sold specifically for that purpose, but many laundry detergents also contain fluorescent compounds called optical brighteners that absorb some UV light and re-emit it in the visible spectrum. Also, getting the fabric wet will change its UV transmittance, typically increasing it.
For some numerical values, I did a quick search on Google Scholar and found a paper titled "Clothing as protection from ultraviolet radiation: which fabric is most effective?" by Sandra Davis, Linda Capjack, Nancy Kerrand Robert Fedosejcvs, published in 1997 in the International Journal of Dermatology 36(5). Alas, the on-line version of the paper is behind a paywall, but I'll quote a few relevant sample SPF values from their table 3 below, courtesy of my university library's on-line subscription:
- Lightweight cotton jersey knit, typical of T-shirt fabrics: SPF 4 (white) / 18 (dyed blue).
- Heavy cotton twill weave, similar to 8 oz. denim: SPF 12 (white) / 166 (dyed blue).
The measured SPF value of 166 for blue denim is basically off the scale: for practical purposes, blue jeans don't let any UV through at all. The relatively low SPF of the white cotton twill is a bit surprising, though, and indeed is what prompted the authors to test the effects of the blue dye:
"The low SPF of 13 [in table 1] for the white cotton twill (jean fabric) was surprising, as previous researchers recommended denim as suitable protection for many sun-sensitive patients. In a pre-test, a sample of blue denim taken from a pair of jeans was tested in the same manner as the above samples and produced a high SPF value. Since the white twill differs only in color from most denim, the indigo dye in blue denim might be an important UV absorber. [...] Dyeing the fabrics dark blue increased the SPF by more than a factor of three for all cotton fabrics."
Still, even an SPF of 12 is nothing to sneer at, particularly since the SPF values for clothing are not subject to the same kind of inflation as those marketed for dermal sunscreens (which are typically only valid if the product is applied thickly and frequently reapplied). You might be able to tan a little bit under white jeans if you spend a lot of time in sunlight, but probably not so you'd notice. The SPF 4 measured for the white T-shirt fabric is pretty low, though: it's a lot better than nothing, but it might not be enough to prevent sunburn if you spend a lot of time outdoors.
However, this study did not cover the effects of laundry additives; for that, we can look at "Improving Knit Fabric UPF Using Consumer Laundry Products: A Comparison of Results Using Two Instruments" by Jihyun Kim, Janis Stone, Patricia Crews, Mack Shelley II and Kathryn L. Hatch from 2004.
In this study, the authors tested the effects of two off-the-shelf laundry detergents containing optical brighteners, one laundry additive sold as an optical brightener and one sold as a UV-absorber. While their numerical values don't seem directly comparable, they do report a more than 3-fold increase in SPF for all the products, comparable to the effects of the blue dye in the Davis et al. study, although, for the detergents, the full effect was only achieved after the cloth had been washed over a dozen times.
So my rough, unscientific conclusion from all this would be that, if you're planning to wear jeans and a white T-shirt while hiking in the mountains or sailing, you should either buy a special UV-protective T-shirt, wash your normal T-shirt with a UV-absorbent laundry additive, or just apply sunscreen under it. But you don't need to worry about the jeans — there's no way you'll get sunburn under those.