<atan2>
Widely availableSince 202395% of users
A more advanced arctangent function that takes two numbers (y and x) to calculate the angle from the origin. It correctly handles all four quadrants, making it the most reliable tool for coordinate-based math in CSS.
What's modern
From web-features, MDN's browser data and our snippets, checked dailyModernIn every major browser since March 2023. Widely available since September 2025.
See how modern your own CSS is.Check your CSS →
Quick example
.pointer {
/* Calculates the angle between two points */
transform: rotate(calc(atan2(var(--y), var(--x))));
}<atan2> browser support
BaselineWidely availableThis feature is well established and works across many devices and browser versions. It has been available across browsers since 2023.Safe to use without fallbacks.
Usage95%of people can use this5% use a browser without it.
Browsers
111+
108+
15.4+
111+Mobile
111+Android
108+Android
15.4+iOS