Reference: The calculations are the customary ones. See for example, Rosner, B., Fundamentals of Biostatistics (4th ed.), Section 7.7.2
Acknowledgments: The JavaScript underlying this page uses normal quantile and probability functions taken from Jan deLeeuw's Web-Based Statistics: The Study of Stability in Variation.