Markov Chain Steady State Calculator

A Markov chain models a system that moves between states at each step with fixed probabilities. Over the long run, an ergodic chain settles into a steady-state distribution that gives the proportion of time spent in each state, no matter where it began. This calculator handles the two-state case: enter the probability of moving from state A to state B and from state B to state A, and it returns the stationary probabilities pi(A) and pi(B) that solve pi = pi P. This is the backbone of queueing models, reliability analysis, and PageRank-style ranking.

0.00
0.00
0.00
0.00

Steady-state formula

a = P(A to B), b = P(B to A)
Stationarity: pi = pi P with pi(A) + pi(B) = 1
pi(A) = b / (a + b)
pi(B) = a / (a + b)
Time in A (%) = pi(A) * 100

The two balance equations reduce, after applying the sum-to-one constraint, to a closed form. The chain spends more time in the state it is harder to leave: a small leave-rate gives a large stationary probability.

How to read the result

  • Each input is a one-step probability between 0 and 1; the chance of staying is 1 minus the leave probability.
  • A unique steady state exists whenever a + b is greater than 0.
  • If a + b equals 0 both states are absorbing and no single stationary distribution applies.
  • The result is independent of the starting state for an irreducible, aperiodic chain.
  • Row sums of the transition matrix always equal 1 by construction.

Markov chain steady state: frequently asked questions

What is a steady-state distribution?

The steady-state (stationary) distribution is the long-run probability of being in each state, independent of where the chain started. It is the vector pi that satisfies pi = pi P, where P is the transition matrix. For an irreducible, aperiodic chain it is unique and the chain converges to it over time.

How is the steady state of a 2-state chain found?

For states A and B with P(A to B) = a and P(B to A) = b, the stationary distribution is pi(A) = b / (a + b) and pi(B) = a / (a + b). This solves pi = pi P together with the constraint that the two probabilities sum to 1.

What do the transition probabilities mean?

Each transition probability is the chance of moving from one state to another in a single step. P(A to B) is the chance of leaving state A for state B; the chance of staying in A is 1 minus that value. Each row of the transition matrix must sum to 1.

When does a unique steady state exist?

A finite Markov chain has a unique steady-state distribution when it is irreducible (every state reachable from every other) and aperiodic. For a 2-state chain this holds whenever a + b is greater than 0 and the chain is not stuck in a single absorbing state.

Does the starting state affect the long-run probabilities?

No. For an ergodic chain the steady-state distribution is reached regardless of the initial state. The starting distribution affects how fast convergence happens, but not the final long-run proportions of time spent in each state.

Official sources

Reviewed by the CalculatorHub team, edited by James Graham, 16 June 2026. See our methodology.