Estimation of tail probabilities in systems that involve uncertain parameters or white noise forcing is important when these unlikely events have severe consequences. Examples of such events are hurricanes, energy grid blackouts or failure of engineered systems. After explaining the challenges of estimating rare event probabilities, I will make a connection between extreme event probability estimation and constrained optimization that is established by large deviation theory. The approach leads to practical methods to estimate small probabilities, and a novel class of challenging, large-scale constrained optimization problems. I will show examples governed by the shallow water and the Navier Stokes equations.