Converts a plane angle between degree, radian, gradian, arcminute, and arcsecond per the BIPM SI Brochure definitions.
Published for review. The Founder is checking every card himself; anything he strikes comes down the same hour.
Try it
Inputs
value (number, from_unit, required) : The angle to convert
from_unit (string, required) one of: degree, radian, gradian, arcminute, arcsecond : Unit of the input value
to_unit (string, required) one of: degree, radian, gradian, arcminute, arcsecond : Unit to convert into
Outputs
result (to_unit): The converted angle
Steps
Look up the exact radian-equivalent of from_unit and of to_unit: degree = pi/180 rad; gradian = pi/200 rad; arcminute = pi/(180*60) rad; arcsecond = pi/(180*3600) rad.
Convert the input to radians: radians = value * rad_per(from_unit).
Convert radians to the target unit: result = radians / rad_per(to_unit).
Round result to 6 significant figures.
Constants
degree = 0.017453292519943295 rad (source: The International System of Units (SI Brochure))
radian = 1 rad (source: The International System of Units (SI Brochure))
gradian = 0.015707963267948967 rad (source: The International System of Units (SI Brochure))
arcminute = 0.0002908882086657216 rad (source: The International System of Units (SI Brochure))
arcsecond = 0.00000484813681109536 rad (source: The International System of Units (SI Brochure))
Sources
The International System of Units (SI Brochure) (Bureau International des Poids et Mesures (BIPM), 2026-09-30T19:29:48Z) - 360 degrees = 400 gradians = 2*pi radians, all exact ratios of pi.