Markov Chain Calculator

Enter a stochastic transition matrix and an initial distribution to get the steady-state vector and the k-step distribution instantly.

Transition Matrix P

Row i = probabilities of moving FROM state i. Each row must sum to 1.

Initial Distribution v0

Probability of starting in each state. Must sum to 1.

Summary

Enter a stochastic transition matrix and an initial distribution to get the steady-state vector and the k-step distribution instantly.

How it works

  1. Select the number of states n (2 to 6) to generate the n×n matrix grid.
  2. Fill in each cell with the transition probability from row-state i to column-state j.
  3. Each row must sum to 1; a live row-sum indicator confirms validity.
  4. Enter the initial probability distribution (must also sum to 1).
  5. Set the number of steps k and click Calculate.
  6. The tool runs power iteration to find the steady-state vector and matrix-multiplies the initial vector k times for the k-step distribution.

Use cases

  • Model customer retention and churn across subscription tiers.
  • Analyze page-rank style link graphs for small networks.
  • Simulate weather-pattern Markov models in statistics coursework.
  • Verify hand-calculated steady-state answers on homework problems.
  • Prototype board-game or inventory-level Markov models quickly.
  • Understand convergence behavior by comparing k-step vs. steady-state.

Frequently Asked Questions

Last updated: 2026-06-10 · Reviewed by Nham Vu