---
title: "COS"
description: "The COS SQL function returns the cosine of the provided angle."
language: en
source_language: en
translation_state: complete
canonical: https://documentation.invantive.eu/en/docs/invantive-universalsql/grammar/sql-functions/cos
original: https://documentation.invantive.eu/en/docs/invantive-universalsql/grammar/sql-functions/cos
updated: 2026-08-09T00:00:00Z
license: https://documentation.invantive.eu/en/
---

## Syntax
```mermaid
%%{init: {
  'theme': 'base',
  'flowchart': { 'padding': '7', 'nodeSpacing': '20', 'rankSpacing': '20' },
  'themeVariables': {
    'fontSize': '11px',
    'fontFamily': 'Arial'
  }
}}%%
flowchart LR
    Start((START)) --> COS[COS]:::quoted
    COS --> End((END))
```

## Purpose
The `COS` SQL function returns the cosine of the provided angle.

See also [[ACOS]].

Parameters:
- Input (`decimal`): the angle to get the cosine of.

Returns: A number which represents the cosine of the provided angle as `decimal`.

## Examples
`COS` retrieves the cosine of the angle 0:
```sql
select cos(0)

--------
1
```
`COS` retrieves the cosine of the angle 1, rounded to four decimals:
```sql
select round(cos(1), 4)

--------
0.5403
```