You will spot a difference when using floats:

>>> 1000.5//1
1000.0
>>> floor(1000.5)
1000

floor returns an integer. For most cases 1000 and 1000.0 are equivalent, but not always.

Answer from Simon Fraser on Stack Overflow
🌐
GeeksforGeeks
geeksforgeeks.org › python › floor-ceil-function-python
floor() and ceil() function Python - GeeksforGeeks
Apart from using the math module, we can also compute the floor and ceil of a float using basic arithmetic operations like floor division (//) and addition.
Published   January 10, 2018
🌐
W3Schools
w3schools.com › python › ref_math_floor.asp
Python math.floor() Method
Python Examples Python Compiler Python Exercises Python Quiz Python Challenges Python Server Python Syllabus Python Study Plan Python Interview Q&A Python Bootcamp Python Certificate Python Training ... # Import math library import math # Round numbers down to the nearest integer print(math.floor(0.6)) print(math.floor(1.4)) print(math.floor(5.3)) print(math.floor(-5.3)) print(math.floor(22.6)) print(math.floor(10.0)) Try it Yourself »
🌐
Python Forum
python-forum.io › thread-9009.html
Is // operator is the same as math.floor()
I am under the assumption 10 // 3 operation(Integer division) is the same as math.floor(10/3). The results are the same for this simple arithmetic problem. But I am wording if they are interchangeable
🌐
Analytics Vidhya
analyticsvidhya.com › home › understanding floor and ceiling functions in python
Floor and Ceiling Functions in Python | Applications and Behaviour
June 20, 2023 - The floor function is handy when values need to be rounded down, like when determining the number of whole units. On the other hand, the ceil function is handy when rounding up is required, like when allocating resources or determining the minimum ...
🌐
Python
docs.python.org › 3 › library › math.html
math — Mathematical functions
Return x with the fractional part removed, leaving the integer part. This rounds toward 0: trunc() is equivalent to floor() for positive x, and equivalent to ceil() for negative x.
🌐
LearnDataSci
learndatasci.com › solutions › python-double-slash-operator-floor-division
Python Double Slash (//) Operator: Floor Division – LearnDataSci
In Python, we can perform floor division (also sometimes known as integer division) using the // operator.
Find elsewhere
🌐
Scaler
scaler.com › home › topics › floor() function in python
floor() Function in Python - Scaler Topics
August 3, 2023 - In the following example given above, the math.floor() is used with the value -20.6 to get the outcome as -21, if the input is given as -22.6 we get the outcome as -23, if the input is -12.2 then the output will be -13 and subsequently displayed in the Python terminal. Example 3) Use floor function for mathematical expressions.
🌐
Raspberry Pi Forums
forums.raspberrypi.com › board index › programming › python
In Python 3 without the Math package, what is the equivalent of ceiling and floor? - Raspberry Pi Forums
Python · Locked · Print view · 2 posts • Page 1 of 1 · jahboater · Posts: 9179 · Joined: Wed Feb 04, 2015 6:38 pm · Wed Nov 16, 2022 11:40 am · The // operator does floor division for integers. DeaD_EyE · Posts: 261 · Joined: Sat May 17, 2014 9:49 pm ·
🌐
Devace Technologies
devacetech.com › home › insights › floor division in python: 2025 tutorial
Floor Division Python: Syntax, Use Cases, and Examples
August 11, 2025 - Here a is the dividend, b is the divisor, // is the floor division operation. This operator is useful to write clean and efficient code, especially in loops, data indexing, game scoring, and logic in a Python chatbot.
🌐
Python Tutorial
pythontutorial.net › home › advanced python › python floor division
Python Floor Division
March 27, 2025 - Python uses // as the floor division operator and % as the modulo operator. If the numerator is N and the denominator D, then this equation N = D * ( N // D) + (N % D) is always satisfied. Use floor division operator // or the floor() function of the math module to get the floor division of ...
🌐
Metaschool
metaschool.so › home › answers › what is floor division in python? guide with examples
What is Floor Division in Python? Guide With Examples
December 6, 2024 - Floor division is a division operation that returns the largest integer that is less than or equal to the result of the division. In Python, it is represented by the double forward slash //. This operator ensures that any fractional part of ...
🌐
Python Reference
python-reference.readthedocs.io › en › latest › docs › operators › floor_division.html
// floor division — Python Reference (The Right Way) 0.1 documentation
// floor division · Edit on GitHub · Returns the integral part of the quotient. A // B · A · Any expression evaluating to a numeric type. B · Any expression evaluating to a numeric type. According to coercion rules. #TODO · Also referred to as integer division.
🌐
CodeGym
codegym.cc › java blog › learning python › floor division in python
Floor Division in Python
November 11, 2024 - The symbol for floor division is //, which makes it easy to spot in code. When you use //, Python divides the two numbers and then truncates (removes) the decimal part, essentially “flooring” the result to the nearest whole number.
🌐
Tutorialspoint
tutorialspoint.com › python › number_floor.htm
Python math.floor() Method
The difference occurs when the floor value of 2.3 is 2, but the floor value of 2.9 will also be 2; unlike the estimation technique which rounds off 2.9 to 3 instead of 2. Note − This function is not accessible directly, so we need to import ...