Defaults are n_1 = 1.00 (air), n_2 = 1.50 (glass), theta_i = 30 deg, beta = 0.5 (natural light). The s polarization fraction beta is the share of s polarized light in the input: beta = 1 is pure s, beta = 0 is pure p, beta = 0.5 is unpolarized natural light.
Blue band = medium 1 (n_1) / Green band = medium 2 (n_2) / Yellow = incident ray / Red = reflected ray (angle = theta_i) / Cyan = refracted ray (theta_t, Snell's law) / White dashed = normal
x-axis = theta_i (0 to 90 deg) / y-axis = R (0 to 1) / Cyan = R_s / Orange = R_p / Green = R_unpol / Green dashed line = Brewster angle / Yellow line = current theta_i
The Fresnel equations give the reflection coefficients for s and p polarization at the interface between two media. Snell's law $n_1 \sin\theta_i = n_2 \sin\theta_t$ provides the transmitted angle $\theta_t$.
Reflection coefficients for s (electric field perpendicular to the plane of incidence) and p (parallel) waves:
$$r_s = \frac{n_1\cos\theta_i - n_2\cos\theta_t}{n_1\cos\theta_i + n_2\cos\theta_t},\quad r_p = \frac{n_2\cos\theta_i - n_1\cos\theta_t}{n_2\cos\theta_i + n_1\cos\theta_t}$$Reflectance and unpolarized reflectance (beta is the s polarization fraction):
$$R_s = r_s^2,\ R_p = r_p^2,\ R_{\text{unpol}} = \beta R_s + (1-\beta) R_p$$Brewster angle (where $r_p = 0$) and critical angle (when $n_1 > n_2$):
$$\tan\theta_B = \frac{n_2}{n_1},\qquad \sin\theta_c = \frac{n_2}{n_1}$$$n_1, n_2$ are the refractive indices (dimensionless) and $\theta_i, \theta_t$ are the incidence and transmitted angles. There is no total internal reflection when $n_1 < n_2$.