Get to know MDN better
This feature is well established and works across many devices and browser versions. It’s been available across browsers since March 2023.
The tan() CSS function is a trigonometric function that returns the tangent of a number, which is a value between −infinity and infinity. The function contains a single calculation that must resolve to either a <number> or an <angle> by interpreting the result of the argument as radians.
The tan(angle) function accepts only one value as its parameter.
angleA calculation which resolves to a <number> or an <angle>. When specifying unitless numbers they are interpreted as a number of radians, representing an <angle>.
The tangent of an angle will always return a number between −∞ and +∞.
The tan() function can be used to draw a parallelogram with a given bounding box.
| CSS Values and Units Module Level 4 # trig-funcs |
Enable JavaScript to view this browser compatibility table.
This page was last modified on Apr 18, 2026 by MDN contributors.
Your blueprint for a better internet.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.