Bookmarks    
nPr and nCr    
Random Number    
SD Calculator    
Sample Size    
Percent Error    
Density    
Molarity    
Molar Mass    
Ohm's Law    
Watts to Amps    
Voltage Drop    
Long Division    
Mixed Numbers    
Rounding    
Nth Root    
Exponents    
Half-Life    
Polar Form    
De Moivre    
3D Distance    
Point to Line    
Cross Product    
Determinant    
Sin Cos Tan    
Triangle Area    
Scale Factor    
Sector Area    
Ellipse Area    
Cube Volume    
Box Volume    
Sphere Volume    
Cone Volume    
Pipe Volume    
Time Duration    
Time Card    
Present Value    
Future Value    
Churn Rate    
A/B Test Calc    
SEO Traffic    
Ideal Weight    
Fat Intake    
Child Height    
Golf Handicap    
Heat Index    
Wind Chill    
Dew Point    
Download Time    
kWh to Cost    
AC Size (BTU)    
Heating Costs    
LED Savings    
Trip Gas Cost    
Tire Size    
Solar Output    
Solar Payback    
Battery Size    
Wall Area    
Gravel Needed    
Mortar Mix    
Slope Grade    
Curtain Size    
Soil Needed    
Sod Needed    
Ramp Length    
Blind Size    
Drain Slope    
Board Feet    
Heat Loss    
Furniture Fit    
Moving Boxes    
Plywood Cuts    
Shelf Sag    
   Add
Probability and random number calculators
Independent Events
Independent Events
Two Events Solver
Two Events Solver
Repeated Trials
Repeated Trials
Bayes' Theorem
Bayes' Theorem
Expected Value
Expected Value
Binomial Distribution
Binomial Distribution
nPr and nCr
nPr and nCr
Circular Permutation
Circular Permutation
With Repetition
With Repetition
Random Number
Random Number
Averages and statistics calculators
Average Calculator
Average Calculator
Mean Median Mode
Mean Median Mode
SD Calculator
SD Calculator
Quartiles & IQR
Quartiles & IQR
Frequency Table
Frequency Table
Correlation (r)
Correlation (r)
Normal Probability
Normal Probability
Z-Score Calculator
Z-Score Calculator
Confidence Interval
Confidence Interval
Sample Size
Sample Size
Mark & Recapture
Mark & Recapture
P-Value Calculator
P-Value Calculator
Percentage and ratio calculators
Percentage Calc
Percentage Calc
Percent Change
Percent Change
Percent Difference
Percent Difference
Percent Error
Percent Error
Ratio Calculator
Ratio Calculator
Discount Calculator
Discount Calculator
Sales Tax Calculator
Sales Tax Calculator
Margin Calculator
Margin Calculator
Speed calculators
Speed Calculator
Speed Calculator
Density and concentration calculators
Density
Density
Molarity
Molarity
Molar Mass
Molar Mass
Physics and electricity calculators
Ohm's Law
Ohm's Law
Watts to Amps
Watts to Amps
Resistor Colors
Resistor Colors
Voltage Drop
Voltage Drop
Unit conversion calculators
Weight Converter
Weight Converter
Shoe Size Converter
Shoe Size Converter
Integer and signed number calculators
Long Division
Long Division
LCM Calculator
LCM Calculator
GCF Calculator
GCF Calculator
Integer Calculator
Integer Calculator
Prime Factorization
Prime Factorization
Diophantine Solver
Diophantine Solver
Modulo Calculator
Modulo Calculator
Factor Calculator
Factor Calculator
Roman Numerals
Roman Numerals
Fraction, decimal and rounding calculators
Fraction Calculator
Fraction Calculator
Mixed Numbers
Mixed Numbers
Simplify Fractions
Simplify Fractions
Fraction to Decimal
Fraction to Decimal
Decimal to Fraction
Decimal to Fraction
Rounding
Rounding
Equation and inequality calculators
Linear Equation
Linear Equation
Linear Systems
Linear Systems
Quadratic Formula
Quadratic Formula
Absolute Value
Absolute Value
Quadratic Inequality
Quadratic Inequality
Polynomial calculators
Binomial Theorem
Binomial Theorem
Square root and nth root calculators
Simplify Radicals
Simplify Radicals
Nth Root
Nth Root
Exponent and logarithm calculators
Exponents
Exponents
Log Calculator
Log Calculator
Number of Digits
Number of Digits
Scientific Notation
Scientific Notation
Sci. Notation Math
Sci. Notation Math
Half-Life
Half-Life
Complex number calculators
Complex Numbers
Complex Numbers
Polar Form
Polar Form
De Moivre
De Moivre
Function and graph calculators
Slope Calculator
Slope Calculator
Linear Function
Linear Function
Direct & Inverse Variation
Direct & Inverse Variation
y = ax² Calculator
y = ax² Calculator
Distance Formula
Distance Formula
3D Distance
3D Distance
Section Formula
Section Formula
Point to Line
Point to Line
Lat/Long Distance
Lat/Long Distance
Complete the Square
Complete the Square
Circle Equation
Circle Equation
Conic Sections
Conic Sections
Polar Coordinates
Polar Coordinates
Sequence calculators
Arithmetic Sequence
Arithmetic Sequence
Geometric Sequence
Geometric Sequence
Fibonacci Sequence
Fibonacci Sequence
Recurrence Relation
Recurrence Relation
Vector calculators
Vector Calculator
Vector Calculator
Cross Product
Cross Product
Matrix calculators
Matrix Calculator
Matrix Calculator
Determinant
Determinant
Inverse Matrix
Inverse Matrix
Plane geometry calculators
Sin Cos Tan
Sin Cos Tan
Degrees ⇔ Radians
Degrees ⇔ Radians
a sin θ + b cos θ
a sin θ + b cos θ
Triangle Solver
Triangle Solver
Triangle Area
Triangle Area
Right Triangle
Right Triangle
Pythagorean Theorem
Pythagorean Theorem
Polygon Angles
Polygon Angles
Scale Factor
Scale Factor
Parallel Lines
Parallel Lines
Rectangle Area
Rectangle Area
Parallelogram Area
Parallelogram Area
Trapezoid Area
Trapezoid Area
Circle Calculator
Circle Calculator
Sector Area
Sector Area
Inscribed Angle
Inscribed Angle
Ellipse Area
Ellipse Area
Solid geometry calculators
Cube Volume
Cube Volume
Cube Surface Area
Cube Surface Area
Box Volume
Box Volume
Box Surface Area
Box Surface Area
Cylinder Volume
Cylinder Volume
Cylinder Surface
Cylinder Surface
Sphere Volume
Sphere Volume
Sphere Surface
Sphere Surface
Spherical Cap Volume
Spherical Cap Volume
Cap Surface Area
Cap Surface Area
Ellipsoid Volume
Ellipsoid Volume
Ellipsoid Surface
Ellipsoid Surface
Pyramid Volume
Pyramid Volume
Pyramid Surface
Pyramid Surface
Cone Volume
Cone Volume
Cone Surface Area
Cone Surface Area
Frustum Volume
Frustum Volume
Frustum Surface Area
Frustum Surface Area
Pipe Volume
Pipe Volume
Capsule Volume
Capsule Volume
Capsule Surface Area
Capsule Surface Area
Date and time calculators
Age Calculator
Age Calculator
Days Between Dates
Days Between Dates
Date Calculator
Date Calculator
Hours From Now
Hours From Now
Day of the Week
Day of the Week
Time Calculator
Time Calculator
Time Zone Converter
Time Zone Converter
Hours Calculator
Hours Calculator
Time Duration
Time Duration
Time Card
Time Card
Finance and economics calculators
Compound Interest
Compound Interest
Simple Interest
Simple Interest
Interest Calculator
Interest Calculator
TVM Calculator
TVM Calculator
Present Value
Present Value
Future Value
Future Value
ROI Calculator
ROI Calculator
IRR Calculator
IRR Calculator
Payback Period
Payback Period
Average Return
Average Return
GDP Calculator
GDP Calculator
Web marketing and ad metric calculators
CTR Calculator
CTR Calculator
Conversion Rate
Conversion Rate
CPC, CPM & CPA
CPC, CPM & CPA
ROAS Calculator
ROAS Calculator
Break-Even CPA
Break-Even CPA
LTV Calculator
LTV Calculator
CAC Calculator
CAC Calculator
Churn Rate
Churn Rate
A/B Test Calc
A/B Test Calc
A/B Sample Size
A/B Sample Size
SEO Traffic
SEO Traffic
Break-Even Point
Break-Even Point
Markup vs. Margin
Markup vs. Margin
CAGR Calculator
CAGR Calculator
Health and fitness calculators
BMI Calculator
BMI Calculator
Sleep Calculator
Sleep Calculator
Calorie Calculator
Calorie Calculator
BMR Calculator
BMR Calculator
TDEE Calculator
TDEE Calculator
Ideal Weight
Ideal Weight
Body Fat Calculator
Body Fat Calculator
Lean Body Mass
Lean Body Mass
Calories Burned
Calories Burned
Protein Intake
Protein Intake
Macro Calculator
Macro Calculator
Carb Calculator
Carb Calculator
Fat Intake
Fat Intake
Child Height
Child Height
Sports calculators
Golf Handicap
Golf Handicap
Pace Calculator
Pace Calculator
1RM Calculator
1RM Calculator
Target Heart Rate
Target Heart Rate
Weather calculators
Heat Index
Heat Index
Wind Chill
Wind Chill
Dew Point
Dew Point
Computer calculators
Base Converter
Base Converter
Subnet Calculator
Subnet Calculator
Download Time
Download Time
Household energy and budget calculators
Electricity Cost
Electricity Cost
kWh to Cost
kWh to Cost
Yearly kWh to Cost
Yearly kWh to Cost
AC Size (BTU)
AC Size (BTU)
AC Running Cost
AC Running Cost
Heating Costs
Heating Costs
Gas vs Electric
Gas vs Electric
LED Savings
LED Savings
Salary Calculator
Salary Calculator
Budget Calculator
Budget Calculator
Car calculators
Trip Gas Cost
Trip Gas Cost
EV Charging Cost
EV Charging Cost
EV vs Gas Cost
EV vs Gas Cost
MPG Calculator
MPG Calculator
Tire Size
Tire Size
Solar power and battery calculators
Solar Output
Solar Output
Solar Panel Count
Solar Panel Count
Solar Payback
Solar Payback
Battery Size
Battery Size
Home and DIY calculators
Tile Calculator
Tile Calculator
Stair Calculator
Stair Calculator
Concrete Volume
Concrete Volume
Wall Area
Wall Area
Wallpaper Rolls
Wallpaper Rolls
Paint Calculator
Paint Calculator
Flooring Needed
Flooring Needed
Exterior Walls
Exterior Walls
Gravel Needed
Gravel Needed
Mortar Mix
Mortar Mix
Slope Grade
Slope Grade
Lumber Cut List
Lumber Cut List
Lot Coverage/FAR
Lot Coverage/FAR
Sheet Vinyl Roll
Sheet Vinyl Roll
Insulation Needed
Insulation Needed
Curtain Size
Curtain Size
TV Size & Distance
TV Size & Distance
Soil Needed
Soil Needed
Sod Needed
Sod Needed
Block Calculator
Block Calculator
Brick Calculator
Brick Calculator
Deck Materials
Deck Materials
Ramp Length
Ramp Length
Pilot Hole Size
Pilot Hole Size
Room Ventilation
Room Ventilation
Paint Thinning
Paint Thinning
Baseboard & Trim
Baseboard & Trim
Blind Size
Blind Size
Picture Hanging
Picture Hanging
Drain Slope
Drain Slope
Screw Calculator
Screw Calculator
Board Feet
Board Feet
Fence Calculator
Fence Calculator
Wood Shrinkage
Wood Shrinkage
Caulk Calculator
Caulk Calculator
Heat Loss
Heat Loss
Furniture Fit
Furniture Fit
Moving Boxes
Moving Boxes
Storage Capacity
Storage Capacity
Plywood Cuts
Plywood Cuts
Shelf Sag
Shelf Sag

Direct and Inverse Variation Calculator (Equation and Constant of Variation from One Point)

Choose direct or inverse variation and enter the coordinates of one point on the graph. If you also enter an x, the value of y for that x is calculated too.

You can use decimals, negative numbers and fractions such as 3/4. For the point, enter one whose x- and y-coordinates are both not 0 (if you use 0, a message explains why the equation cannot be found).
Result and graph
Enter the coordinates of a point on the graph in the fields on the left and press "Calculate". The result and the graph will appear here.

What you can do on this page

  • Enter the coordinates of just one point on the graph, and you get the direct variation equation \(y = ax\) or the inverse variation equation \(y = \dfrac{a}{x}\) and the constant of variation \(a\) on the spot
  • The constant of variation is found the way it is taught in school, as "\(y\) divided by \(x\)" (for inverse variation, "\(x\) times \(y\)"), with the steps shown. The answer is an exact fraction in lowest terms, such as \(-\dfrac{2}{3}\)
  • It can also find the value of \(y\) for an \(x\) you choose (optional)
  • It also shows a table of values for \(x = -6\) to \(6\) and a graph (a straight line through the origin for direct variation, a hyperbola for inverse variation)
  • Coordinates can be decimals, negative numbers or fractions such as 3/4
Direct variation is a function of the form \(y = ax\), and inverse variation is a function of the form \(y = \dfrac{a}{x}\) (in both, \(a \neq 0\)). Many textbooks write the constant as \(k\) (\(y = kx\), \(y = \dfrac{k}{x}\)); this page uses \(a\). You can do both calculations on this one page.

What is this calculation used for?

Estimating the cost of a purchase (cost varies directly with quantity)

The cost of \(x\) pens at $3 each is \(y = 3x\) dollars. The unit price is the constant of variation, and if you buy twice as many, you pay twice as much. Quick estimates such as "how much for 8?" are this equation at work.
Prices by weight (apples at $2 per pound: 3 pounds cost \(2 \times 3 = 6\) dollars) and gas at the pump ($3.50 per gallon: 10 gallons cost $35) work the same way. When there is no bulk discount, the cost is directly proportional to the amount.

Distance, fuel and time (distance varies directly)

For a car driving at a steady speed, the distance covered is directly proportional to the time (at 60 mph, \(y = 60x\)). A car that gets 30 miles per gallon can go \(y = 30x\) miles on \(x\) gallons, so with 12 gallons left it can go about \(30 \times 12 = 360\) more miles.
These are estimates that assume the speed and fuel economy stay about the same, but they are the most common direct variation calculations when planning a trip or a drive.

Speed and travel time (inverse variation for a fixed distance)

For a trip to a place 120 miles away, the travel time is \(y = \dfrac{120}{x}\) hours, where \(x\) is the speed in mph. At 60 mph it takes 2 hours; at 30 mph, 4 hours. Doubling the speed cuts the time in half, a classic example of inverse variation.
The sign of inverse variation is a product that stays fixed: speed × time = distance. You can use it to compare the travel times of a train and a bus, or to plan your pace.

Sharing work (the amount per person varies inversely with the number of people)

If \(x\) people split 600 flyers evenly, each person hands out \(y = \dfrac{600}{x}\) flyers. Double the number of people, and each person's share is cut in half.
Whenever a fixed amount of work is shared equally, such as getting ready for a school fair or dividing up data entry, this inverse variation gives a guide for how many people you need.

How far a spring stretches (Hooke's law in science is direct variation)

How far a spring stretches is directly proportional to the weight hanging from it (Hooke's law, taught in science class). If a spring stretches 4 cm under 20 g, the stretch is \(y = 0.2x\) cm (\(x\) is the mass in grams), so 50 g stretches it 10 cm. The constant of variation shows how easily the spring stretches.
A spring scale, which measures weight by how far a spring stretches, is built on this property. But the law only holds as long as the spring is not stretched so far that it cannot spring back.

Formulas and graphs

Direct variation \(y = ax\)
Graph
Standard notation (the usual math form)
\(y\) \(=\) \(a\) \(x\)
In words (symbols replaced with words)
③ value of \(y\) \(=\) ① \(a\): constant of variation ② value of \(x\)
The formula in words
① Take the \(a\): constant of variation
② multiply it by the value of \(x\)
③ and you get the value of \(y\)
Quick example
The cost \(y\) (in dollars) of \(x\) pens at $3 each is (constant of variation \(a = 3\))
cost \(y\) dollars \(=\) price of one pen, $3 number of pens \(x\)
\(y = 3x\)
\(y = 3 \times 5 = 15\ \ (x = 5)\)
Key idea
The key to direct variation is this: when \(x\) is doubled or tripled, \(y\) is also doubled or tripled. Buy twice as many pens and you pay twice as much. The graph is always a straight line through the origin \((0,\ 0)\) (0 pens cost $0). If the constant of variation \(a\) is positive, the line rises to the right; if it is negative, the line falls to the right. \(y = ax\) is a short way of writing "\(a \times x\)" without the multiplication sign. Put in a value for \(x\), and \(y\) is determined.
Finding the constant of direct variation (\(a = y \div x\))
Standard notation (the usual math form)
\(a\) \(=\) \(y\) \(\div\) \(x\)
In words (symbols replaced with words)
③ \(a\): constant of variation \(=\) ① value of \(y\) \(\div\) ② value of \(x\)
The formula in words
① Take the value of \(y\)
② divide it by the value of \(x\)
③ and you get the \(a\): constant of variation
Quick example
The constant of the direct variation through the point \((2,\ 6)\) is
\(a\): constant of variation \(=\) value of \(y\), 6 \(\div\) value of \(x\), 2
\(a = 6 \div 2 = 3\)
\(y = 3x\)
Key idea
In a direct variation, "\(y \div x\)" has the same value at every point on the graph. This fixed value is the constant of variation \(a\). So once you know one point on the graph, you just divide its \(y\)-coordinate by its \(x\)-coordinate, and the equation is found. When the division does not come out even, math convention is to leave the answer as a fraction in lowest terms, such as \(a = -4 \div 6 = -\dfrac{2}{3}\) (this calculator shows fractions too).
Inverse variation \(y = \dfrac{a}{x}\)
Graph
Standard notation (the usual math form)
\(y\) \(=\) \(a\) \(\div\) \(x\)
In words (symbols replaced with words)
③ value of \(y\) \(=\) ① \(a\): constant of variation \(\div\) ② value of \(x\)
The formula in words
① Take the \(a\): constant of variation
② divide it by the value of \(x\)
③ and you get the value of \(y\)
Quick example
For a rectangle with an area of 12, the width \(x\) and the height \(y\) are related by (constant of variation \(a = 12\))
height \(y\) \(=\) area, 12 \(\div\) width \(x\)
\(y = \dfrac{12}{x}\)
\(y = \dfrac{12}{4} = 3\ \ (x = 4)\)
Key idea
The key to inverse variation is this: when \(x\) is doubled or tripled, \(y\) becomes \(\dfrac{1}{2}\) or \(\dfrac{1}{3}\) as large. For a rectangle with an area of 12, doubling the width cuts the height in half. The division \(a \div x\) can be written as the fraction \(\dfrac{a}{x}\), so inverse variation is usually written \(y = \dfrac{a}{x}\). The graph is a pair of smooth curves called a hyperbola. At \(x = 0\) you would be dividing by 0, so there is no value of \(y\), and the graph never crosses the \(y\)-axis.
Finding the constant of inverse variation (\(a = x \times y\))
Standard notation (the usual math form)
\(a\) \(=\) \(x\) \(\times\) \(y\)
In words (symbols replaced with words)
③ \(a\): constant of variation \(=\) ① value of \(x\) \(\times\) ② value of \(y\)
The formula in words
① Take the value of \(x\)
② multiply it by the value of \(y\)
③ and you get the \(a\): constant of variation
Quick example
The constant of the inverse variation through the point \((2,\ 6)\) is
\(a\): constant of variation \(=\) value of \(x\), 2 \(\times\) value of \(y\), 6
\(a = 2 \times 6 = 12\)
\(y = \dfrac{12}{x}\)
Key idea
Multiply both sides of \(y = \dfrac{a}{x}\) by \(x\) and you get \(x \times y = a\). This shows the key property of inverse variation: the product of \(x\) and \(y\) is always the same. So once you know one point on the graph, you just multiply its \(x\)-coordinate by its \(y\)-coordinate, and the constant of variation is found. When \(a\) is positive, the rectangle with the origin and a point on the graph as opposite corners has an area (\(x \times y\)) equal to \(a\), whichever point you pick (the rectangle in the "Graph" below shows this area). When \(a\) is negative, \(x \times y\) still always equals \(a\).
Direct variation is \(y = ax\) (the constant is \(a = y \div x\)), and inverse variation is \(y = \dfrac{a}{x}\) (the constant is \(a = x \times y\)). In both cases, one point on the graph is enough to find the equation. The graph of a direct variation is a straight line through the origin; the graph of an inverse variation is a hyperbola.

Symbols and terms

Symbols

\(x,\ y\) ex, why Letters for two quantities that change together (variables). By custom, letters near the end of the alphabet, \(x,\ y,\ z\), stand for numbers that can take many values and are not fixed yet (this is said to come from the way the mathematician Descartes used them).
\(a\) a The letter for the constant of variation. By custom, letters near the start of the alphabet, \(a,\ b,\ c\), stand for fixed numbers (constants). Many textbooks use \(k\) instead. In both \(y = ax\) and \(y = \dfrac{a}{x}\), once \(a\) is known, the whole equation is known.
\((2,\ 6)\) two, six (a point) The way to write the coordinates of a point. The first number in the parentheses is the \(x\)-coordinate and the second is the \(y\)-coordinate. "Passes through the point \((2,\ 6)\)" says that \(y = 6\) when \(x = 2\).
\(\div\), \(\times\) divided by, times The signs for division and multiplication. The constant of variation is \(y \div x\) for direct variation and \(x \times y\) for inverse variation. In algebra, the multiplication sign is left out, so \(ax\) stands for \(a \times x\).
\(\neq\) is not equal to The sign for "not equal". It is an equals sign with a slash through it. The "\(a \neq 0\)" in the definitions of direct and inverse variation says that \(a\) is any number other than 0.

Terms

direct variation A relationship where doubling or tripling \(x\) also doubles or triples \(y\). We also say "\(y\) is directly proportional to \(x\)". The equation is \(y = ax\) (\(a \neq 0\)), and the graph is a straight line through the origin. It is taught in middle school (Grade 7) as a proportional relationship.
inverse variation A relationship where doubling or tripling \(x\) makes \(y\) \(\dfrac{1}{2}\) or \(\dfrac{1}{3}\) as large. We also say "\(y\) is inversely proportional to \(x\)". The equation is \(y = \dfrac{a}{x}\) (\(a \neq 0\)), and \(x \times y\) is always the same. The graph is a hyperbola.
constant of variation The \(a\) in \(y = ax\) and \(y = \dfrac{a}{x}\), also called the constant of proportionality. It is the fixed number that decides the equation: \(y \div x\) for direct variation, and \(x \times y\) for inverse variation, equals this value at every point.
function A rule that takes in a number and gives back exactly one number. Direct and inverse variation are both functions, because each value of \(x\) gives exactly one value of \(y\).
variable A letter that can take many values. In direct and inverse variation, \(x\) and \(y\) are the variables, as opposed to a fixed number (a constant) such as \(a\).
coordinates A pair of numbers \((x,\ y)\) that gives the position of a point. The horizontal position is the \(x\)-coordinate and the vertical position is the \(y\)-coordinate. A graph is the set of all points \((x,\ y)\) that make the equation true.
origin The center of the coordinate plane, \((0,\ 0)\). It is labeled \(O\), the first letter of "origin". The graph of a direct variation always passes through the origin.
hyperbola The pair of smooth curves that forms the graph of an inverse variation. The curves get closer and closer to the \(x\)-axis and the \(y\)-axis but never touch them.
table of values A table that lists values of \(x\) with the matching values of \(y\). Textbooks use it to check the properties of direct and inverse variation (how \(y\) changes when \(x\) is doubled or tripled).

Good to know before you start

Here is what helps you use the calculation on this page with real understanding, not just by pressing the button.
If you get stuck, going back over these topics is the fastest way forward.

Positive and negative numbers (Grade 7)
  • Knowing the sign rules for multiplying and dividing with negative numbers (positive × negative is negative, negative × negative is positive; for example, \(4 \times (-3) = -12\))
  • Being able to put a negative number into an expression inside parentheses, as in \((-3)\)
Algebraic expressions (Grades 6–7)
  • Knowing that an equation such as \(y = 3x\) is a rule: pick a value of \(x\), and the value of \(y\) is determined
  • Knowing that \(3x\) stands for \(3 \times x\) (the multiplication sign is left out), and being able to substitute a number for a letter
The coordinate plane (Grades 5–6)
  • Knowing how coordinates such as \((2,\ 6)\) are written (\(x\)-coordinate first, then \(y\)-coordinate), and being able to plot the point on the coordinate plane
  • Knowing where the origin \((0,\ 0)\) is
Working with fractions (Grades 4–6)
  • Being able to simplify a fraction to lowest terms (for example, \(\dfrac{4}{6} = \dfrac{2}{3}\))
  • Being able to write the result of a division as a fraction (for example, \(4 \div 6 = \dfrac{4}{6}\))
Two quantities that change together (Grades 6–7)
  • Knowing that some pairs of quantities change together, so that when one changes, the other does too (ratios and proportional relationships in Grades 6–7 lead into this page)
  • Having seen the idea of "when one is multiplied by some number, the other is multiplied by some number too"

How to calculate it in Excel

Copy the whole table below and paste it into cell A1 in Excel. It works as is.
Table to find the direct variation y = ax
x-coordinate of the point 2
y-coordinate of the point 6
Constant a = y ÷ x =B2/B1
x to find y for 5
y = a × x =B3*B4
Table to find the inverse variation y = a/x
x-coordinate of the point 2
y-coordinate of the point 6
Constant a = x × y =B1*B2
x to find y for 8
y = a ÷ x =B3/B4
Table of values for a direct variation
Constant a 3
x -3 -2 -1 0 1 2 3
y = ax =B2*$B$1 =C2*$B$1 =D2*$B$1 =E2*$B$1 =F2*$B$1 =G2*$B$1 =H2*$B$1
Table of values for an inverse variation
Constant a 12
x -4 -3 -2 -1 1 2 3 4
y = a/x =$B$1/B2 =$B$1/C2 =$B$1/D2 =$B$1/E2 =$B$1/F2 =$B$1/G2 =$B$1/H2 =$B$1/I2
After pasting, the upper rows (the coordinates of the point and so on) are your inputs, and the lower rows are calculated automatically. "*" is multiplication and "/" is division.
The first table is the direct variation through the point (2, 6): the constant a is 3, and y is 15 when x = 5.
The second table is the inverse variation through the same point (2, 6): a is 12, and y is 1.5 (= 3/2) when x = 8.
The third and fourth tables build a table of values with an x row and a y row, as in textbooks. The $ in $B$1 keeps the reference to the constant fixed when you copy the formula across. The inverse variation table has no x = 0, because you cannot divide by 0 (inverse variation is not defined at x = 0).

How to calculate it in Google Sheets

Copy the whole table below and paste it into cell A1 in Google Sheets. It works as is.
Table to find the direct variation y = ax
x-coordinate of the point 2
y-coordinate of the point 6
Constant a = y ÷ x =B2/B1
x to find y for 5
y = a × x =B3*B4
Table to find the inverse variation y = a/x
x-coordinate of the point 2
y-coordinate of the point 6
Constant a = x × y =B1*B2
x to find y for 8
y = a ÷ x =B3/B4
Table of values for a direct variation
Constant a 3
x -3 -2 -1 0 1 2 3
y = ax =B2*$B$1 =C2*$B$1 =D2*$B$1 =E2*$B$1 =F2*$B$1 =G2*$B$1 =H2*$B$1
Table of values for an inverse variation
Constant a 12
x -4 -3 -2 -1 1 2 3 4
y = a/x =$B$1/B2 =$B$1/C2 =$B$1/D2 =$B$1/E2 =$B$1/F2 =$B$1/G2 =$B$1/H2 =$B$1/I2
The same formulas as in Excel work as is. Copy the whole table, paste it into cell A1, and replace the coordinates of the point or the constant with your own numbers.

How to calculate it in Python

from fractions import Fraction

# A point (x1, y1) on the graph (a fraction such as 3/4 can be written Fraction(3, 4))
x1 = Fraction(2)
y1 = Fraction(6)

# Direct variation y = ax: the constant is "y divided by x"
constant_direct = y1 / x1
print(f"Constant a = {constant_direct}  ->  equation y = {constant_direct}x")

# Inverse variation y = a/x: the constant is "x times y"
constant_inverse = x1 * y1
print(f"Constant a = {constant_inverse}  ->  equation y = {constant_inverse}/x")

# The value of y for a chosen x
x_value = Fraction(8)
print(f"Direct:  when x = {x_value}, y = {constant_direct * x_value}")
print(f"Inverse: when x = {x_value}, y = {constant_inverse / x_value}")
The fractions module in the standard library lets you calculate with exact fractions, with no decimal rounding errors. This example is the direct and inverse variation through the point (2, 6). When you run it, the constants 3 and 12 are shown, and the values of y at x = 8 are 24 and 3/2. Change the coordinates of the point and the value of x, and run it again.

How to write it in LaTeX and other math languages (copy and paste)

Direct variation \(y = ax\)
y = ax
y = ax
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <mrow>
    <mi>y</mi>
    <mo>=</mo>
    <mi>a</mi>
    <mi>x</mi>
  </mrow>
</math>
y = a x
y == a x
y := a*x;
y = a*x;
y = ax
Finding the constant of direct variation (\(a = y \div x\))
a = y ÷ x
a = \frac{y}{x}
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <mrow>
    <mi>a</mi>
    <mo>=</mo>
    <mfrac>
      <mi>y</mi>
      <mi>x</mi>
    </mfrac>
  </mrow>
</math>
a = y/x
a == y/x
a := y/x;
a = y/x;
a = y/x
Inverse variation \(y = \dfrac{a}{x}\)
y = a/x
y = \frac{a}{x}
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <mrow>
    <mi>y</mi>
    <mo>=</mo>
    <mfrac>
      <mi>a</mi>
      <mi>x</mi>
    </mfrac>
  </mrow>
</math>
y = a/x
y == a/x
y := a/x;
y = a/x;
y = a/x
Finding the constant of inverse variation (\(a = x \times y\))
a = x × y
a = xy
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <mrow>
    <mi>a</mi>
    <mo>=</mo>
    <mi>x</mi>
    <mi>y</mi>
  </mrow>
</math>
a = x y
a == x y
a := x*y;
a = x*y;
a = xy

How to have ChatGPT  do the calculation

You are a math calculation assistant for direct and inverse variation. Do the following calculation by actually running Python code, and base your answer only on the numbers from the execution result (do not answer by mental math or guessing).

y varies directly with x, and the graph passes through the point (2, 6).
1. The constant of variation a (y divided by x), and y written as an equation in x
2. The value of y when x = 5

Also, if y varies inversely with x and the graph passes through the same point (2, 6):
3. The constant of variation a (x times y), and y written as an equation in x
4. The value of y when x = 8 (as a fraction in lowest terms and as a decimal)

In Python, use the fractions module from the standard library to calculate exactly. Show the formulas you used and the numbers from the execution result.

How to Use
  1. 1
    Enter your numbers
    Type the numbers you want to calculate with into the input fields
  2. 2
    Calculate
    Press the "Calculate" button
  3. 3
    Check the result
    The result appears on the spot. The same page also explains the idea behind the calculation and the formula
  DataChef Features
Easy and Free
Unlimited conversions for free.
No technical knowledge required.
Intuitive and user-friendly operation.
No Registration Required
Available immediately after access.
Can be used without registering personal information.
Safe and Secure
Fully SSL encrypted communication.
Automatic file deletion by clicking "download".
Fast
High-speed site access
and rapid file conversion.
No Watermark
No watermark.
No attribution required.
Commercial Use Available
Free for commercial use.
No need to contact us for commercial use permission.