coderef

calc() keywordsBaseline · Widely available

The e, pi, infinity, and NaN keywords represent well-defined constants accepted in CSS math functions such as calc().

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

Browser support

DesktopChrome
1–109Not supported
110+Supportedsince Feb 7, 2023
Current: 155
Edge
12–109Not supported
110+Supportedsince Feb 9, 2023
Current: 154
Firefox
1–113Not supported
114+Supportedsince Jun 6, 2023
Current: 157
Safari
1–15.6Not supported
16+Supportedsince Sep 12, 2022
Current: 27
MobileChrome Android
18–109Not supported
110+Supportedsince Feb 7, 2023
Current: 155
Firefox Android
4–113Not supported
114+Supportedsince Jun 6, 2023
Current: 157
Safari iOS
1–15.6Not supported
16+Supportedsince Sep 12, 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: calc-keyword.

Feature detection

There’s no simple runtime check for this feature; rely on the support table and test in your target browsers.

Sub-features

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

Sub-featureChromeEdgeFirefoxSafariChrome AndroidFirefox AndroidSafari iOS
<calc-keyword>999910815.49910815.4
<calc-keyword>.NaN9999114169911416
<calc-keyword>.e11011010815.411010815.4
<calc-keyword>.infinity9999114169911416
<calc-keyword>.pi10910910815.410910815.4