Markov Chain and Random Walk Calculator
Takes a transition matrix and gives n-step probabilities, the stationary distribution and absorbing-state results, plus gambler's ruin and the distribution of a random walk.
- Free
- No sign-up
- Works on any device
About Markov Chain and Random Walk Calculator
Type a transition matrix, with row i holding the probabilities of moving from state i to every state, and the tool raises it to the n-th power, applies it to a starting distribution and solves for the stationary distribution π = πP. It reports whether the chain is irreducible or regular and, with absorbing states, the expected steps before absorption and the chance of ending in each. The random walk mode solves gambler's ruin and the position after n steps. From 3 with a barrier at 10 and p = 0.5 the chance of winning is 30 percent after 21 expected steps.
How to use Markov Chain and Random Walk Calculator
- Enter the transition matrix with one row per state and rows that add up to 1, or switch to the random walk.
- Set the number of steps and, if you wish, the starting distribution and state names.
- Read the distribution after n steps, the stationary distribution and the absorbing-state tables.
Why use this tool?
- Private: everything happens in your browser. Nothing you enter is uploaded.
- Free, with no sign-up, no watermark and no limit on how often you use it.
- Works on phones, tablets and computers: Android, iPhone, Windows, Mac and Linux. Nothing to install.
- Free to embed on your own website, with a ready-made code to copy.
Also known as
Frequently asked questions
What is a stationary distribution?
It is a probability vector π with π = πP: if the chain starts with that distribution it keeps it forever. For a regular chain every starting point converges to it in the long run.
What is an absorbing state?
A state the chain can never leave, shown by a 1 on the diagonal of its row. The tool then computes the expected steps until absorption and the chance of ending in each absorbing state.
What if my rows add up to 100 or to counts?
Tick the box to divide every row by its total, which turns counts or percentages into probabilities. Without it, rows that do not add up to 1 are reported as errors.
Is Markov Chain and Random Walk Calculator free?
Yes. Markov Chain and Random Walk Calculator on Toolipedia is free to use, with no sign-up and no watermark.
Is it safe to use?
Yes. Everything is worked out in your browser, and nothing you enter is sent to our server.
Does it work on my phone?
Yes. It works in any modern browser on Android and iPhone, as well as on tablets and computers. There's nothing to install.
Do I need an account?
No. Just open the page and use the tool. There's no sign-up and no email needed.
Can I put Markov Chain and Random Walk Calculator on my own website?
Yes. Use the Embed on your site button under the tool to copy a short piece of code and paste it into your page. It is free, needs no account, and the tool keeps working inside your page.