We present a new Monte Carlo algorithm for studying site or bond percolatio
n on any lattice. The algorithm allows us to calculate quantities such as t
he cluster size distribution or spanning probability over the entire range
of site or bond occupation probabilities from zero to one in a single run w
hich takes an amount of time scaling linearly with the number of sites on t
he lattice. We use our algorithm to determine that the percolation transiti
on occurs at p(c) = 0.592 746 21(13) for site percolation on the square lat
tice and to provide clear numerical confirmation of the conjectured 4/3-pow
er stretched-exponential tails in the spanning probability functions.