Step Function: Definition, Equation & Examples

An error occurred trying to load this video.

Try refreshing the page, or contact customer support.

Coming up next: Transitive Property: Definition & Examples

You're on a roll. Keep up the good work!

Take Quiz Watch Next Lesson
Your next lesson will play in 10 seconds
  • 0:00 Step Function
  • 1:33 Greatest Integer Function
  • 2:10 Least Integer Function
  • 3:17 Heaviside Function
  • 4:00 Lesson Summary
Save Save Save

Want to watch this again later?

Log in or sign up to add this lesson to a Custom Course.

Log in or Sign up

Speed Speed

Recommended Lessons and Courses for You

Lesson Transcript
Laura Pennington

Laura received her Master's degree in Pure Mathematics from Michigan State University. She has 15 years of experience teaching collegiate mathematics at various institutions.

Expert Contributor
Kathryn Boddie

Kathryn earned her Ph.D. in Mathematics from UW-Milwaukee in 2019. She has over 10 years of teaching experience at high school and university level.

In this lesson, we'll learn what a step function is and become comfortable with this type of function. We'll examine common examples, such as the floor and ceiling functions and the heaviside function.

Step Function

Mathematically speaking, a step function is a function whose graph looks like a series of steps because it consists of a series of horizontal line segments with jumps in-between. For this reason, it is also sometimes called a staircase function.

A step function has a constant value on given intervals, but the constant is different for each interval. The constant value on each interval creates the series of horizontal lines, and the fact that the constant is different for each interval creates the jumps in between each horizontal line segment. This is why the graph of a step function looks like a set of stairs.

To help us better understand this definition, let's consider a real-world example. Suppose I start a cleaning business. I decide to charge each client based on how many hours I work for that client.

My charge structure is as follows:

  • Less than one hour: $10.00
  • One hour up to two hours: $20.00
  • Two hours up to three hours: $30.00
  • Three hours up to four hours: $40.00

This means that if I work anywhere from 1-59 minutes, I charge $10.00. If I work anywhere from 1 hour to 1 hour and 59 minutes, I charge $20.00, and so on. We see that the amount I charge remains constant on each hour-long interval, but varies on each of those intervals, because it goes up each hour. Here is the graph corresponding to this example.

cleaning business graph

It is easy to see from this graph why a step function is sometimes called a staircase function; it looks exactly like a set of stairs.

Greatest Integer Function

In mathematics, a common example used to introduce step functions is the greatest integer function (also called the floor function). The greatest integer function is often represented as x with bottom brackets around it.

greatest integer function

It maps each real number x to the greatest integer that is less than or equal to x. Whatever we put into the greatest integer function, we get the greatest integer that is less than or equal to that input as our output. Here is the graph of the greatest integer function.

greatest integer function

It is easy to see that the greatest integer function is a step function from its graph.

Least Integer Function

Let's consider another example of a step function that is very similar to the greatest integer function. It is called the least integer function (also known as the ceiling function). The least integer function is often represented as x with top brackets around it.

Least Integer Function

The least integer function is a step function that assigns, or maps, each real number x to the smallest integer that is greater than or equal to x. Whatever we put into the least integer function, we get the smallest integer that is less than or equal to that input as our output. The least integer function is shown in the graph on screen.

least integer function

We see that the graph of the least integer function looks like a set of stairs, as it should since this is a step function.

To unlock this lesson you must be a Member.
Create your account

Additional Activities

Comparing a Step Function to a Linear Function - When is it Cheaper to Buy a Coffee Pot?

Imagine you are a coffee drinker. How much coffee would you need to drink for it to be cheaper to buy your own coffee pot? We will compare the price of purchasing a coffee pot and coffee to brew at home to the price of buying a cup of coffee from a coffee shop.

Data Collection

1. Look up the price for a single cup coffee pot - a machine that uses k-cups.

2. Look up the price for a pack of k-cups and make sure to note how many k-cups are in the pack.

3. Look up the price of a cup of coffee at a coffee shop of your choice.

Equation Writing

1. If you are buying a single cup coffee pot and k-cups, you only need to buy the coffee pot once, but you will need a new pack of k-cups whenever you run out. The initial amount of money you need to spend is the price of the coffee pot and one pack of k-cups. That is the one-time price that covers every cup of coffee you make with the pack of k-cups. The total price after the next pack of k-cups is the previous price plus the price of one more pack. Write down an equation for a step function representing the total cost of making coffee at home.

An example to help guide you - If the coffee pot costs $60.00 and a 24 pack of k-cups costs $12, the step function is given by c(x) = 72 if 0 ≤ x ≤ 24

c(x) = 84 if 24 < x ≤ 48

c(x) = 96 if 48 < x ≤ 72

where x is the number of cups of coffee made, and so on.

2. For the coffee bought at the coffee shop, you pay a fixed price for every cup of coffee. This is a linear function. For example, if a cup of coffee costs $2, you would write the total cost as c(x) = 2x where x is the number of cups of coffee.


Graph both the step function and the linear function on the same graph. The linear function will be smaller than the step function originally. Find where the linear function and the step function change places - this will tell you when it is cheaper overall to make your coffee at home versus getting it at the coffee shop. In the example laid out above, the coffee pot becomes cheaper once 42 cups of coffee are needed. 42 cups of coffee in the step function has a total cost of $84 and 42 cups of coffee in the linear function also costs $84. If you keep graphing, the graphs will hit each other briefly again, when 48 cups of coffee are needed, since 48 cups in both functions costs a total of $96. However, the step function remains at $96 until more than 72 cups of coffee are made and the cost of 72 cups of coffee at the coffee shop would be $144.

Register to view this lesson

Are you a student or a teacher?

Unlock Your Education

See for yourself why 30 million people use

Become a member and start learning now.
Become a Member  Back
What teachers are saying about
Try it risk-free for 30 days

Earning College Credit

Did you know… We have over 200 college courses that prepare you to earn credit by exam that is accepted by over 1,500 colleges and universities. You can test out of the first two years of college and save thousands off your degree. Anyone can earn credit-by-exam regardless of age or education level.

To learn more, visit our Earning Credit Page

Transferring credit to the school of your choice

Not sure what college you want to attend yet? has thousands of articles about every imaginable degree, area of study and career path that can help you find the school that's right for you.

Create an account to start this course today
Try it risk-free for 30 days!
Create an account