Pi= ni/N as the proportion of type I (ni= the total number of individuals of microbe in total i type, N= the total number of all the individuals in total n)
The criteria adopted for interpreting the Shanon- wiener’s diversity (Feriantia-Fachrul et al., 2005) are as follows: H 3= high diversity.
Shannon-Wiener index i.e. HꞋ=∑PilogPi, in which Pi is the proportion of individual numbers of the i species to the total individual number of each species in the quadrats
There is no "correct" formula for H'. Formulations vary according to what is being measured, on or what units. The formula given by the previous respondents is the most popular one and will give the results in terms of natural bits, or nits, an entropy-related unit useful to compare with equally-abundant species (look in the literature for Hill numbers).
But another common formulation seeks to produce results in terms of bits-individual, or simply bits: the amount of information that can be attributed to each individual. This formula is exactly as above, but uses binary logarithms (base 2).
The choice of the logarithm base is largely arbitrary (and one can convert the results from one base to another by merely multiplying by the log of the other base), but when you compare your H' results to any other published H' you must of course make sure you are using the same units!
What is less arbitrary, though, is that Shannon-Wiener's H' measures information under the assumption that you have a sufficiently large but finite sample from an infinite universe where the number of species is known. It does not measure the total information contained in an ecosystem or in a collection. Actually, H' can be thought as a sample-generalized simplification of a more comprehensive measure of diversity, which is Brillouin's index. This applies to collections, i.e. situations in which you know or have counted all the data that are there--and this is may well be the case when working with biodiversity. The formula is a bit harder to calculate (factorials are nasty beasts):
HB = [ ln N! - SUM ( ln ni! ) ] / N
where N is the total number of individuals (the collection size) and ni the abundance of each species.
For large samples, though, H' and HB tend to converge.
A different case arises when your sample is actually too small. Then you're bound to miss some species in your sample. A correction was proposed by Chao and Shen (2003) but I haven't seen it used often. It uses the binary formulation of Shannon but divides each term in the summatory by 1-(1-pi)N.
A judicious choice for a formula will thus be based on you deciding what exactly do you want to measure, to what do you want to compare your measurements, and what is the nature of your data or samples.