Monte Carlo Simulator

Estimate π and integrals by random sampling

Throw random darts at the unit square. The fraction landing inside the quarter circle approximates its area, π/4, so π ≈ 4 × (inside ÷ total).

π ≈ 4 × (hits inside ÷ N)
Estimate
3,1472
True value
3,1415926536
Standard error (±1σ)
±0,0231686519
Absolute error
0,0056073464
Relative error
0,1784873798%
Hits inside
3934 of 5000
Estimate πUnit square with a quarter-circle arc; randomly scattered dots are colored by whether they fall inside the arc.π ≈ 3,1472