In this tutorial, Learn how to convert float to integer type value in Python. **The short answer is**: use int() function to convert a positive or negative float value to an integer.

If you use only the int(), you will get integer value **without a round figure**. To convert float to int with the round figure, read this tutorial to the end.

## Python Convert Float to Integer Using int()

If you want to convert float to integer variable type in Python. You have to **use the int() function** of Python. Pass the float variable as the argument of the int() function in Python.

To print the resulted integer value after conversion, you have to u**se the Python print** function.

1 2 | myFloat = 10.8; print(int(myFloat)); |

Output

The above example prints the integer value in the output. However, this is the **positive conversion** of the positive float value. If you want to **convert a negative** float value to an integer, you have to **read the next section** of this post.

## How to Change Negative Float Value to Int in Python

To convert the negative float value, you have to use the same int() function. You have to also** pass the float variable** as the argument of the int() in Python.

The negative float value gives the **negative integer** on conversion.

1 2 | myFloat = -10.8; print(int(myFloat)); |

Output

The above example showing the negative integer value in the output after conversion. All the above example showing the conversion from float to int **without round figure**.

If you **want to convert** float to integer type value **with round figure** conversion. **Read the next section** of the post to learn how to how to make the conversion with round figure.

## How to Altering Float to Int in Round Figure

If you want to convert float to int type value in Python with a round figure. You have to** use the round() function** of Python inside the int() function. Pass the float variable as the argument of the round() function in Python.

The round() function **add one to the integer** value after conversion, if the digit after the decimal point is **more than 5**.

1 2 | myFloat = 10.8; print(int(round(myFloat))); |

Output

The above example contains 10 as the float value before the decimal point. However, the resulted integer value after conversion **gives 11 as the output**. This is just because the float contains the value of more than 5 after the decimal point.

**You may also like to read**

Hope, you like this tutorial of how to convert float to an integer value in Python. If you **have any query** regarding the tutorial, **please comment below**.

**References**

- Stackoverflow Discussion on Safest way of converting float to int in Python
- Digitalocean Tutorial on How to Convert Data Types in Python
- Python Official Doc on Decimal fixed point and floating point arithmetic

Also tell me, **which method you are using** to convert the float type value to int type.