--- title: "COS (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: - "COS" - "COS_TSQL" dev_langs: - "TSQL" helpviewer_keywords: - "cosine" - "COS function" ms.assetid: c9fa8ae1-3373-4f3e-9b97-fa05077c1040 caps.latest.revision: 21 author: "edmacauley" ms.author: "edmaca" manager: "craigg" ms.workload: "Inactive" monikerRange: ">= aps-pdw-2016 || = azuresqldb-current || = azure-sqldw-latest || >= sql-server-2016 || = sqlallproducts-allversions" --- # COS (Transact-SQL) [!INCLUDE[tsql-appliesto-ss2008-all-md](../../includes/tsql-appliesto-ss2008-all-md.md)] Is a mathematical function that returns the trigonometric cosine of the specified angle, in radians, in the specified expression. ![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 COS ( float_expression ) ``` ## Arguments *float_expression* Is an [expression](../../t-sql/language-elements/expressions-transact-sql.md) of type **float**. ## Return types **float** ## Examples The following example returns the COS of the specific angle. ```sql DECLARE @angle float; SET @angle = 14.78; SELECT 'The COS of the angle is: ' + CONVERT(varchar,COS(@angle)); GO ``` [!INCLUDE[ssResult](../../includes/ssresult-md.md)] ```sql The COS of the angle is: -0.599465 (1 row(s) affected) ``` ## Examples [!INCLUDE[ssSDWfull](../../includes/sssdwfull-md.md)] and [!INCLUDE[ssPDW](../../includes/sspdw-md.md)] The following example returns the COS of the specific angle. ```sql SELECT COS(14.76) AS cosCalc1, COS(-0.1472738) AS cosCalc2; ``` [!INCLUDE[ssResult](../../includes/ssresult-md.md)] ``` cosCalc1 cosCalc2 -------- -------- -0.58 0.99 ``` ## See also [Mathematical Functions (Transact-SQL)](../../t-sql/functions/mathematical-functions-transact-sql.md)