Tanto is used to compare quantities and amounts of elements, tão is used to compare properties. (Actually tão is a comparative of equality, see 21.2.)
Ela tem tantos livros como eu.
not: Ela tem tão ...
She has as many books as I do.
Tanto as well as tão can be used as adverbs, athough with different meanings. Tão describes the intensity of property, tanto a quantity. In other words: If we compare two properties or if we want to describe a high intensity ("He is so sweet!"), we use tão and if we want two compare two properties or describe a big amount ("There is still so much to do") we use tanto.
tão describes a high intensity / compares two properties
Ele corre tão rápido como qualquer outro colega de aula.
He runs as fast as any of his classmates.
Por que você come tão depressa?
Why do you eat so fast?
Como alguém tão pequena come tanto?
How can someone so small eat so much.
Nunca ganha tanto com seu trabalho.
With your work you will never earn so much.
tanto describes the quantity so much, so many, so many things
Agora, sei por que ele ganha tanto.
Now I know why he earns so much.
Faz muito tempo que não vejo tantos.
I haven't seen so many recently.
Ainda há tanta coisa que eu não sei sobre ti.
There are so many things I still don't know about you.