github.com/rstandt/terraform@v0.12.32-0.20230710220336-b1063613405c/website/docs/configuration/functions/floor.html.md (about) 1 --- 2 layout: "functions" 3 page_title: "floor - Functions - Configuration Language" 4 sidebar_current: "docs-funcs-numeric-floor" 5 description: |- 6 The floor function returns the closest whole number less than or equal to 7 the given value. 8 --- 9 10 # `floor` Function 11 12 -> **Note:** This page is about Terraform 0.12 and later. For Terraform 0.11 and 13 earlier, see 14 [0.11 Configuration Language: Interpolation Syntax](../../configuration-0-11/interpolation.html). 15 16 `floor` returns the closest whole number that is less than or equal to the 17 given value, which may be a fraction. 18 19 ## Examples 20 21 ``` 22 > floor(5) 23 5 24 > floor(4.9) 25 4 26 ``` 27 28 ## Related Functions 29 30 * [`ceil`](./ceil.html), which rounds to the nearest whole number _greater than_ 31 or equal.