Markov Chain Calculator
Enter a transition matrix and initial probabilities. All calculations run locally in your browser.
Power iteration starts from your initial distribution, stops at a maximum coordinate change ≤ 1e-10, or after 10,000 iterations. The estimate depends on the input and start; convergence and uniqueness are not guaranteed.
pₖ₊₁ = pₖP
A QUICK WALKTHROUGH
How to use this tool
- Set a 2–12 state row-stochastic matrix and an initial distribution.
- Choose 0–10,000 steps and calculate.
- Review the finite-step result, stationary estimate and convergence status.
Row-vector convention
The calculation uses pₖ₊₁ = pₖP. Rows describe transitions from the corresponding state. Accepted sums within 1e-9 of 1 are normalized before calculation.
Bounded numerical estimate
Power iteration uses the supplied start, at most 10,000 iterations and a 1e-10 coordinate-change threshold. The displayed residual is max |pP − p|; no convergence or uniqueness guarantee is made.
GOOD TO KNOW
Common questions
What if the iteration does not settle?
The last iterate is shown with a limit-reached status, rather than presented as a converged stationary distribution.
Is my matrix uploaded?
No. The matrix and probabilities stay in the current browser page.