Calculator
Overall page layout stays in a single column, while the calculator fields use a responsive 3-column, 2-column, and 1-column form grid.
Formula Used
The calculator uses the transformation rule g(x) = A · f(B(x - h)) + k.
h controls the horizontal shift.
k controls the vertical shift.
A controls vertical stretch, compression, and x-axis reflection.
B controls horizontal stretch, compression, and y-axis reflection.
A positive h shifts the graph right because the input becomes x - h.
A negative h shifts it left.
A positive k shifts the graph upward, while a negative k shifts it downward.
When B is not 1, the graph also changes width. When A is not 1, the graph also changes height.
How to Use This Calculator
- Choose a base function such as quadratic, absolute value, sine, or cosine.
- Enter the horizontal shift h and vertical shift k.
- Optionally adjust vertical scale A and horizontal scale B.
- Set an x-value to evaluate one exact point on both graphs.
- Define the graph range and point count for a smoother or faster plot.
- Submit the form to see the result, graph, preview table, and export buttons.
Example Data Table
Example below uses the quadratic parent function with h = 2 and k = 3, so g(x) = (x - 2)² + 3.
| X | Original f(x) = x² | Shifted g(x) = (x - 2)² + 3 |
|---|---|---|
| -1 | 1 | 12 |
| 0 | 0 | 7 |
| 1 | 1 | 4 |
| 2 | 4 | 3 |
| 3 | 9 | 4 |
| 4 | 16 | 7 |
FAQs
1. What is a horizontal shift?
A horizontal shift moves a graph left or right. In a rule like f(x - h), a positive h moves the graph right, while a negative h moves it left.
2. What is a vertical shift?
A vertical shift moves a graph up or down. Adding +k outside the function moves the graph upward, and subtracting k moves it downward.
3. Why does x - h move right instead of left?
The input must reach the same original value later. Because of that delay, every point appears farther to the right on the graph.
4. Can this calculator handle more than shifts?
Yes. It also supports vertical scaling, horizontal scaling, and reflections by using A and B in the transformation rule.
5. What happens with square root inputs?
Square root functions only exist when the inside value is zero or positive. Undefined points are skipped in the graph and marked clearly in the table.
6. Are trig graphs measured in degrees or radians?
You can choose either mode. The selected angle mode changes how sine and cosine x-values are interpreted during plotting and evaluation.
7. What do the CSV and PDF downloads contain?
They contain the generated coordinate table for the current calculation, including x-values, original outputs, and transformed outputs for the full plotted range.
8. Why are some transformed values undefined?
Some functions have domain limits. For example, square root requires nonnegative inputs, and extremely large exponential inputs can overflow practical graph ranges.