# mwc-random

> Fast, high-quality pseudo-random number generation for Haskell

Source: https://talira.ai/catalog/mwc-random-m2fcfxtd
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library
- Categories: [libraries / math / random number generation](https://talira.ai/categories/libraries/math/random-number-generation), [languages / haskell](https://talira.ai/categories/languages/haskell)
- Licence: BSD-2-Clause[^1][^2]
- Pricing: Free and open source[^1]
- Free tier: yes[^1]
- Backed by: [Alexey Khudyakov](https://talira.ai/orgs/alexey-khudyakov.md)

mwc-random is a Haskell library (the `System.Random.MWC` module) for generating high-quality pseudo-random numbers, fast and with little memory, suitable for statistical work. Its uniform generator is Marsaglia's MWC256 (MWC8222) multiply-with-carry, with a period of 2^8222, which does well in randomness tests and runs two to three times faster than the Mersenne Twister. It samples uniform, normal and other distributions, including binomial and Poisson, and works with version 1.3 of the random package.

## Links

- GitHub: https://github.com/haskell/mwc-random

## Problems it solves

- generate lots of random numbers fast in Haskell for a simulation
- sample from a normal distribution in Haskell
- a statistically sound random number generator for Haskell

## Features

- MWC256 multiply-with-carry generator with a 2^8222 period
- two to three times faster than the Mersenne Twister
- uniform, normal, binomial and Poisson sampling
- works with the random 1.3 interface

## Trust

Overall: 0.27 out of 1.
Signals: maintenance 0.27, adoption 0.36, momentum 0.04, community 0.53, backing 0.30, extensibility 0.00.

- 61 GitHub stars
- 20 contributors
- backed by Alexey Khudyakov

Warnings:

- last commit 11 months ago

## Alternatives

- [random](https://talira.ai/catalog/random-v3g277x0.md): Pseudo-random number generation for Haskell
- [MonadRandom](https://talira.ai/catalog/monadrandom-66qvzv5r.md): Random-number generation monad for Haskell

## Sources

[^1]: https://github.com/haskell/mwc-random/blob/master/LICENSE (checked 28 Nov 2026)
[^2]: https://github.com/haskell/mwc-random/blob/master/mwc-random.cabal (checked 28 Nov 2026)
