coderef

Trigonometric functions (CSS)Baseline · Widely available

The sin(), cos(), tan(), asin(), acos(), atan(), and atan2() CSS functions compute various trigonometric functions.

Supported in all major browsers for at least 30 months — safe to use without fallbacks. Baseline since Mar 13, 2023. Widely available since Sep 13, 2025.

Browser support

DesktopChrome
1–110Not supported
111+Supportedsince Mar 7, 2023
Current: 155
Edge
12–110Not supported
111+Supportedsince Mar 13, 2023
Current: 154
Firefox
1–107Not supported
108+Supportedsince Dec 13, 2022
Current: 157
Safari
1–15.3Not supported
15.4+Supportedsince Mar 14, 2022
Current: 27
MobileChrome Android
18–110Not supported
111+Supportedsince Mar 7, 2023
Current: 155
Firefox Android
4–107Not supported
108+Supportedsince Dec 13, 2022
Current: 157
Safari iOS
1–15.3Not supported
15.4+Supportedsince Mar 14, 2022
Current: 27

How to use

This feature is Baseline widely available — use it freely, no fallback needed.

Example

Full syntax and examples are on MDN: acos.

Feature detection

CSS · check before using
@supports (width: calc(1px * sin(30deg))) {
  /* styles that use sin */
}

/* or in JavaScript */
if (CSS.supports("width", "calc(1px * sin(30deg))")) {
  // use it
}

Sub-features

Support for each part of the feature (7). The overall table above shows when the whole feature works.

Sub-featureChromeEdgeFirefoxSafariChrome AndroidFirefox AndroidSafari iOS
<acos>11111110815.411110815.4
<asin>11111110815.411110815.4
<atan>11111110815.411110815.4
<atan2>11111110815.411110815.4
<cos>11111110815.411110815.4
<sin>11111110815.411110815.4
<tan>11111110815.411110815.4