# Can Math.random() be 0 or 1?

**URL:** <https://forum.kirupa.com/t/can-math-random-be-0-or-1/320662>\
**Category:** random\
**Created:** [March 29, 2011, 5:22pm UTC](https://forum.kirupa.com/t/can-math-random-be-0-or-1/320662 "2011-03-29T17:22:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Swooter](https://avatars.discourse-cdn.com/v4/letter/s/e9a140/32.png) [@Swooter](https://forum.kirupa.com/u/Swooter)\
**Post date:** [March 29, 2011, 5:22pm UTC](https://forum.kirupa.com/t/can-math-random-be-0-or-1/320662/1 "2011-03-29T17:22:31Z")

</div>

As the title says… Is it possible that a Math.random returns a zero or one?
