SQL Flow Field Guide

ATN2

Catalog support for SQL Server 2022 (16.x) and 2025 (17.x)

math

What changes

Input
numeric arguments
Output or change
numeric value
Return type
float

Syntax at a glance

ATN2 ( float_expression , float_expression )

Work example

Calculate two-input inverse tangent while preserving quadrant information.

Test domain limits and the largest expected input. Keep degree and radian units explicit.

Check your work Check which argument is y and which is x and test values on both sides of zero.

Open Microsoft Learn for full syntax, permissions, and details for your version.