Dice Simulator

Exact combinatorial math

Dice Simulator

An interactive probability distribution calculator and dice simulation suite powered by Plotly.js.

About the Project

Dice Simulator is a mathematical analysis and visualization web application designed to compute and display exact probability distributions for arbitrary combinations of polyhedral dice. Built with vanilla JavaScript, modern CSS, and Plotly.js, the tool caters to tabletop game designers, statistical analysts, and gamers seeking precise mathematical insights into dice pool mechanics.

Users can build custom dice bags using standard polyhedral dice (d4, d6, d8, d10, d12, d20, d100) as well as custom-sided dice with specific face values and static modifiers. The simulation engine calculates exact combinatorial frequencies, probability density functions, and cumulative distribution curves. Interactive Plotly charts visualize outcome spreads, expected values, standard deviations, and percentile thresholds alongside structured frequency tables.

Key Features & Engineering Highlights

  • Custom dice pool builder supporting standard polyhedrals, arbitrary face counts, and flat roll modifiers
  • Exact combinatorial mathematics calculating probability mass functions and cumulative likelihoods
  • Interactive Plotly.js visualization rendering distribution curves, variance bands, and outcome histograms
  • Comprehensive statistical summary tables displaying mean, median, standard deviation, and min/max rolls
  • Responsive dark-mode UI with fast client-side calculations and zero external server dependencies

Related Projects

Other work that shares technologies or themes with Dice Simulator.