We consider consensus algorithms in their most general setting and provide conditions under which such algorithms are guaranteed to converge, almost surely, to a consensus. Let {A(t), B(t)} is an element of R(NxN) be (possibly) stochastic, nonstationary matrices and {x(t), m(t)} is an element of R(Nx1) be state and perturbation vectors, respectively. For any consensus algorithm of the form x(t + 1) = A(t)x(t) + B(t)m(t), we provide conditions under which consensus is achieved almost surely, i.e., Pr{lim(t ->infinity) x(t) = c1} = 1 for some c is an element of R. Moreover, we show that this general result subsumes recently reported results for specific consensus algorithms classes, including sum-preserving, nonsum-preserving, quantized, and noisy gossip algorithms. Also provided are the epsilon-converging time for any such converging iterative algorithm, i.e., the earliest time at which the vector x(t) is epsilon close to consensus, and sufficient conditions for convergence in expectation to the average of the initial node measurements. Finally, mean square error bounds of any consensus algorithm of the form discussed above are presented.