Equation
θ = 2 arctan(w / (2f))
A 36 mm wide sensor behind a 50 mm lens spans 39.60° horizontally. Cropping the width to 18 mm reduces the angle to 20.41°. The focal length stays at 50 mm.
When to use it
For a rectilinear lens focused at infinity with negligible distortion. Use the active width of the image area you read out. Use sensor height for the vertical angle in the same equation.