--- title: "ATN2 (Transact-SQL) | Microsoft Docs" ms.custom: "" ms.date: "07/24/2017" ms.prod: "sql" ms.prod_service: "database-engine, sql-database, sql-data-warehouse, pdw" ms.service: "" ms.component: "t-sql|functions" ms.reviewer: "" ms.suite: "sql" ms.technology: - "database-engine" ms.tgt_pltfrm: "" ms.topic: "language-reference" f1_keywords: - "ATN2" - "ATN2_TSQL" dev_langs: - "TSQL" helpviewer_keywords: - "arctangent" - "tangent" - "ATN2 function" ms.assetid: 014b291e-7cd7-4c39-b20d-5db3a9f0505d caps.latest.revision: 36 author: "edmacauley" ms.author: "edmaca" manager: "craigg" ms.workload: "Inactive" monikerRange: ">= aps-pdw-2016 || = azuresqldb-current || = azure-sqldw-latest || >= sql-server-2016 || = sqlallproducts-allversions" --- # ATN2 (Transact-SQL) [!INCLUDE[tsql-appliesto-ss2008-all-md](../../includes/tsql-appliesto-ss2008-all-md.md)] Returns the angle, in radians, between the positive x-axis and the ray from the origin to the point (y, x), where x and y are the values of the two specified float expressions. ![Topic link icon](../../database-engine/configure-windows/media/topic-link.gif "Topic link icon") [Transact-SQL Syntax Conventions](../../t-sql/language-elements/transact-sql-syntax-conventions-transact-sql.md) ## Syntax ```sql ATN2 ( float_expression , float_expression ) ``` ## Arguments *float_expression* An [expression](../../t-sql/language-elements/expressions-transact-sql.md) of data type **float**. ## Return types **float** ## Examples The following example calculates the `ATN2` for the specified `x` and `y` components. ```sql DECLARE @x float = 35.175643, @y float = 129.44; SELECT 'The ATN2 of the angle is: ' + CONVERT(varchar, ATN2(@y, @x)); GO ``` [!INCLUDE[ssResult](../../includes/ssresult-md.md)] ```sql The ATN2 of the angle is: 1.30545 (1 row(s) affected) ``` ## See also [CAST and CONVERT (Transact-SQL)](../../t-sql/functions/cast-and-convert-transact-sql.md) [float and real (Transact-SQL)](../../t-sql/data-types/float-and-real-transact-sql.md) [Mathematical Functions (Transact-SQL)](../../t-sql/functions/mathematical-functions-transact-sql.md)