Function Reference

SIN

Returns the sine of an angle given in radians.

MySQL 8.4
SIN(angle)
angle
Angle in radians
DOUBLE

Return value

A floating-point number from -1 to 1

Examples

Sine of a right angle

MySQL 8.4
SELECT SIN(PI() / 2);
SIN(PI() / 2)
1

Sine of 30° rounded

MySQL 8.4
SELECT SIN(RADIANS(30)) AS raw,
	ROUND(SIN(RADIANS(30)), 2) AS rounded;
rawrounded
0.499999999999999940.5

Details

To convert degrees to radians, use the RADIANS function: SIN(RADIANS(30)).

SIN(PI()) gives about 1e-16, not exactly 0.

See also

Where to learn