Graph of y = log₂ x (Binary logarithm)

· How we calculate · Free, no sign-up

Quick answer

The graph of y = log₂ x is a slowly rising curve through (1, 0), (2, 1) and (4, 2) with a vertical asymptote at x = 0. Domain: x > 0, i.e. (0, ∞); range: All real numbers (−∞, ∞). x-intercept: x = 1; y-intercept: None. It is neither even nor odd.

Functiony = log₂ x
Domainx > 0, i.e. (0, ∞)
RangeAll real numbers (−∞, ∞)
x-intercept(s)x = 1
y-interceptNone
Derivative1/(x ln 2)
Graph of y = log₂ x for −1 ≤ x ≤ 9−10123456789−4−3−2−101234
Graph of y = log₂ x for −1 ≤ x ≤ 9, −4 ≤ y ≤ 4. Dashed lines are asymptotes. Dots mark intercepts.
Zoom, pan and trace y = log₂ x next to y = ln x in the interactive grapher.Open the Graphing Calculator →

What the graph of y = log₂ x looks like

log₂ x asks how many times you must double 1 to reach x: log₂ 8 = 3 because 2 × 2 × 2 = 8. Each doubling of x adds exactly 1 to y, so the curve rises one step for every doubling — steeply near zero and slowly further out. It is the reflection of 2ˣ in the line y = x.

It is the logarithm of computer science (bits, binary search, the height of balanced trees). Since log₂ x = ln x / ln 2 ≈ 1.4427 ln x, it is the natural-log curve stretched vertically.

Key features of y = log₂ x

Key features of y = log₂ x
PropertyValue
Functiony = log₂ x (Binary logarithm)
FamilyLogarithmic
Domainx > 0, i.e. (0, ∞)
RangeAll real numbers (−∞, ∞)
x-intercept(s)x = 1
y-interceptNone
SymmetryNeither even nor odd
AsymptotesVertical x = 0
PeriodNot periodic
Increasing on(0, ∞)
Decreasing onNever
Key pointsPasses (½, −1), (1, 0), (2, 1), (8, 3)
Derivative f′(x)1/(x ln 2)
Antiderivative ∫ f(x) dx(x ln x − x)/ln 2 + C

Symmetry: Neither even nor odd. Because the function is not defined for negative x, it cannot be even or odd. Intercepts: the graph meets the x-axis at x = 1 and the y-axis at None.

Table of values for y = log₂ x

Values of y = log₂ x
xy = log₂ xSlope f′(x)
0undefinedundefined
0.25−25.7708
0.5−12.8854
101.4427
210.7213
420.3607
830.1803
1640.0902

How to sketch y = log₂ x by hand

Plot the points from the table — (0.25, −2), (0.5, −1), (1, 0), (2, 1), (4, 2), (8, 3) — on axes running from about −1 to 9 horizontally. Draw the asymptotes first (vertical x = 0) as dashed lines; the curve gets ever closer to them without crossing in that direction. Then join the points with a smooth curve. As a check on the shape — increasing: (0, ∞); decreasing: Never.

Derivative, tangent line and area

The derivative of y = log₂ x is 1/(x ln 2), which gives the slope of the curve at each point (the third column of the table). At x = 1 the curve is at height 0 and its slope is f′(1) = 1.4427, so the tangent line there is y = 1.4427x − 1.4427.

The signed area under the curve from x = 1 to x = 2 is 0.5573, found using the antiderivative (x ln x − x)/ln 2 + C.

Related graphs and transformations

Browse all graphs of common functions by family, or open the graphing calculator.

Frequently asked questions

What is the domain and range of y = log₂ x?

Domain: x > 0, i.e. (0, ∞). Range: All real numbers (−∞, ∞).

What are the intercepts of y = log₂ x?

x-intercept(s): x = 1. y-intercept: None.

What is the derivative of y = log₂ x?

f′(x) = 1/(x ln 2). At x = 1 the curve is at height 0 and its slope is f′(1) = 1.4427, so the tangent line there is y = 1.4427x − 1.4427.

Is y = log₂ x even, odd or neither?

Neither even nor odd. Because the function is not defined for negative x, it cannot be even or odd.

Does y = log₂ x have asymptotes?

Vertical x = 0.