Constant of Proportionality Calculator
Eight gallons of gas for 28.40 dollars gives a constant of 3.55 dollars per gallon. Divide 28.40 by 8 to get the price of one gallon, then multiply by any number of gallons. For 12 gallons the tool returns 42.60, and the equation is y = 3.55x.
| Constant k = y / x | |
| Equation | |
| Second pair check | |
| Predicted y | |
| Predicted x | |
Enter one pair to get k, then use the check pair to confirm the same constant holds. Every calculation runs in your browser and no data is uploaded.
Enter one matching pair of x and y values and get the constant k, the equation y = kx, and predictions for any other value.
Key takeaways
- The constant of proportionality is k = y divided by x, the same number as the unit rate
- Eight gallons for 28.40 dollars gives k = 3.55 dollars per gallon
- A second pair must give the same k, or the relationship is not proportional
- The graph of y = kx is a straight line through the origin
- With k known, y for any x is k times x, and x for any y is y divided by k
On this page
What the constant of proportionality means
Two quantities are proportional when they always move by the same factor. Double one and the other doubles. The constant of proportionality, usually written k, is that fixed factor. If one gallon of gas costs 3.55 dollars, then 2 gallons cost 7.10 dollars and 8 gallons cost 28.40 dollars, and the ratio of cost to gallons comes out the same every time. That repeated ratio is k.
The idea gets a formal name in school math. The Common Core grade 7 standards ask students to identify the constant of proportionality, also called the unit rate, in tables, graphs, equations and verbal descriptions. Algebra courses give the same relationship the name direct variation: OpenStax's Elementary Algebra writes it as y = kx and calls k the constant of variation.
Unit rate is the plain English version of the same idea. Miles per gallon, dollars per hour, cookies per cup: each one is a k. Once you know k, one small equation answers every question about the relationship, which is why this page is built around finding it.
How to find k from one pair of values
Finding k takes one division. Take any matching pair, divide the output y by the input x, and the result is the constant: k = y / x. It does not matter which pair you pick, because every pair produces the same k when the relationship is proportional. That is also the definition of a unit rate.
Suppose 8 gallons of gas cost 28.40 dollars. The constant is 28.40 / 8 = 3.55, so k is 3.55 dollars per gallon. The equation for the relationship is y = 3.55x, where y is the cost and x is the gallons pumped.
Here are four everyday pairs and the k each one hides. Notice that the units of k come straight from the units of y and x.
| What you measured | Pair (x, y) | k = y / x |
|---|---|---|
| Gas cost | 8 gallons, 28.40 dollars | 3.55 dollars per gallon |
| Hourly pay | 12 hours, 96 dollars | 8 dollars per hour |
| Fuel economy | 8 gallons, 240 miles | 30 miles per gallon |
| Cookie batch | 4 cups flour, 60 cookies | 15 cookies per cup |
Each row is one division. The gas row is 28.40 / 8 = 3.55. The pay row is 96 / 12 = 8. The mileage row is 240 / 8 = 30. The cookie row is 60 / 4 = 15. Four different situations, four different constants, one identical recipe for finding them.
How to test whether a relationship is proportional
One pair is enough to compute a k, but two pairs are enough to check that a k exists. Divide y by x for each pair. If the two answers match, the relationship is proportional. If they differ, no single k describes it, and predictions built from one pair will drift away from the real numbers.
Take a phone plan that charges 7 dollars for 2 gigabytes and 17.50 dollars for 5 gigabytes. The first pair gives 7 / 2 = 3.5 dollars per gigabyte. The second gives 17.50 / 5 = 3.5 as well, so the plan is proportional and k is 3.5.
Now change the second pair to 16 dollars for 5 gigabytes. That gives 16 / 5 = 3.2, which does not match 3.5. Something else sits inside the bill, a flat fee most likely, and the flat fee breaks proportionality. Any equation of the form y = mx + b with a b other than 0 fails the same test.
| Pair | k = y / x | Verdict |
|---|---|---|
| 2 GB for 7 dollars | 3.5 | proportional |
| 5 GB for 17.50 dollars | 3.5 | proportional |
| 5 GB for 16 dollars | 3.2 | not proportional |
The graph test says the same thing from a different angle. A proportional relationship plots as a straight line that passes through the origin, the point (0, 0). A line that starts above or below zero carries a fixed extra amount, and that fixed amount is exactly what the mismatched k values are reporting.
Everyday calculations that run on k
Once k is set, every question about the relationship becomes one multiplication or one division. Four common cases show the pattern.
Fuel money. At 3.55 dollars per gallon, 12 gallons cost 3.55 x 12 = 42.60 dollars. Working the other direction, a 25 dollar budget buys 25 / 3.55 = 7.04 gallons.
Distance. A car that went 240 miles on 8 gallons runs at 30 miles per gallon. On 12 gallons it should cover 30 x 12 = 360 miles, give or take what traffic does to the average.
Pay. Earning 96 dollars across 12 hours works out to 8 dollars per hour. A 30 hour week at the same rate pays 8 x 30 = 240 dollars.
Batches. A recipe that turns 4 cups of flour into 60 cookies runs at 15 cookies per cup. With 6 cups you can expect 15 x 6 = 90 cookies.
None of these needed a new formula. Each one reused a constant that one division produced, and that is the whole appeal of proportional thinking: measure once, scale forever.
Direct proportion is not the only kind
The y = kx pattern is called direct variation: both variables rise and fall together. The other common pattern is inverse proportion, where the product of the two variables stays fixed and the equation is y = k / x. There, when one variable goes up, the other goes down.
Speed and travel time make the classic pair. A 180 mile trip at 60 miles per hour takes 3 hours, because 180 / 60 = 3. At 45 miles per hour the same trip takes 180 / 45 = 4 hours. The products 60 x 3 = 180 and 45 x 4 = 180 stay constant, and that fixed product is the k of the inverse relationship.
OpenStax treats the two forms side by side in the same section: direct variation is y = kx and inverse variation is y = k / x. This page and its calculator handle the direct case, which is the one that matches unit rates in daily life. If your numbers follow the inverse pattern, dividing y by x will produce a different k for every pair, and that mismatch is the clue.
Using k to predict either variable
The equation y = kx reads forward and backward. Forward, multiply: any x produces its y as k times x. Backward, divide: any y produces its x as y divided by k.
With the gas constant of 3.55, filling a 12 gallon tank costs 3.55 x 12 = 42.60 dollars. Going the other way, an 88.75 dollar fill-up took 88.75 / 3.55 = 25 gallons, which is how you can reconstruct tank size from a receipt.
Keep k exact as long as you can and round only the final answer. Rounding k to 3.5 before multiplying gives 3.5 x 12 = 42 dollars, a 60 cent error on a single tank, and the error grows with bigger purchases. The calculator keeps full precision internally and rounds only what it shows you.
One habit makes predictions trustworthy: state the units of k in the same breath as the number. A prediction of 42.60 means little until you say 42.60 dollars for 12 gallons, and neither number can be checked without the other.
Five mistakes people make with k
- Dividing the wrong way. k is y divided by x, output over input. For 96 dollars earned in 12 hours, the constant is 96 / 12 = 8 dollars per hour. Flipping it gives 12 / 96 = 0.125, which is hours per dollar and answers a different question.
- Rounding k too early. Cutting 3.55 down to 3.5 before multiplying turns a 42.60 estimate into 42 and sends every later figure the same way.
- Trusting a single pair. Any two numbers produce some k. The relationship only earns the name proportional when a second pair gives the same k.
- Mixing units inside one pair. 240 miles on 8 gallons is 30 miles per gallon, and the same 240 miles on 2 tanks is 120 miles per tank. Both are valid constants, but they cannot be combined or compared.
- Dropping the units of k. A k of 3.55 is incomplete. A k of 3.55 dollars per gallon can be checked against a gas station receipt.
The flipped division is the most common slip, because hours per dollar and dollars per hour are both reasonable looking numbers. Writing the units next to k makes the direction impossible to miss.
What the calculator returns
The defaults are the gas case: 8 gallons for 28.40 dollars, with a second pair of 16 gallons for 56.80 dollars entered to confirm the relationship holds.
| Field | Value for the default case |
|---|---|
| First pair (x, y) | 8, 28.40 |
| Constant k = y / x | 3.55 dollars per gallon |
| Equation | y = 3.55x |
| Second pair check | 56.80 / 16 = 3.55, matches |
| Predicted y at x = 12 | 42.60 |
| Predicted x at y = 88.75 | 25 |
Change any input and everything downstream updates: the constant, the equation, the check, and both predictions. Read the check row first. A mismatch there means the two pairs do not share a k, and no amount of clean arithmetic will make the predictions land.
Every calculation runs in your browser and nothing you type is uploaded anywhere.
Frequently asked questions
What is the constant of proportionality?
It is the fixed number k that links two proportional quantities through y = kx. You find it by dividing any y by its matching x. If 8 gallons cost 28.40 dollars, k is 3.55 dollars per gallon.
How do you find k with one pair of numbers?
Divide the output by the input. For 96 dollars earned across 12 hours, 96 / 12 = 8, so k is 8 dollars per hour and the equation is y = 8x.
Is the constant of proportionality the same as the unit rate?
Yes. Both describe how much output comes with one unit of input. 3.55 dollars per gallon, 30 miles per gallon and 15 cookies per cup are all constants of proportionality.
Does the graph have to pass through the origin?
Yes for a proportional relationship. A straight line that starts anywhere other than (0, 0) carries a fixed extra amount, and dividing y by x will give a different k for every pair.
How do I check that two pairs are proportional?
Divide each pair and compare. 7 / 2 = 3.5 and 17.50 / 5 = 3.5 match, so those pairs share one k. A pair giving 16 / 5 = 3.2 would not match.
Can k be negative?
Yes. When y falls as x rises, k is negative. A plane descending 3,000 feet every 10 minutes has a k of negative 300 feet per minute, and the line slopes downhill.
What does k = 0 mean?
It means the output never changes: y is 0 no matter what x is. That plots as a flat line, and most people would not call it a working relationship between the two quantities.
How is direct variation different from inverse proportion?
Direct variation is y = kx, so both variables move together. Inverse proportion is y = k / x, so the product stays fixed. A 180 mile trip takes 3 hours at 60 miles per hour and 4 hours at 45, holding 180 constant.
Why do my predictions drift away from real numbers?
Usually k was rounded too early or the relationship was never proportional. Recompute k with more decimal places, then confirm that a second pair gives the same value before you predict.
What are the units of k?
The units of y divided by the units of x: dollars per gallon, miles per hour, cookies per cup. Writing the units down is the fastest way to catch a division done backwards.
Can I scale a recipe this way?
Yes, if every ingredient scales by the same factor. A batch of 60 cookies from 4 cups of flour has k of 15 cookies per cup, so 6 cups should give 15 x 6 = 90 cookies.
What if my x value is 0?
Dividing by 0 is undefined, so a pair with x = 0 cannot produce a k. In a proportional relationship y is 0 when x is 0, and you need a pair where x is something other than 0.
Is y = 2x + 5 proportional?
No. The plus 5 is a fixed amount that does not scale, so y divided by x changes with every pair. Proportional equations contain nothing but k times x.
Does the calculator store what I type?
No. Every calculation runs in your browser, and nothing is uploaded or saved.
Spotted a wrong number or a broken result?
More Everyday tools
- 1 Hour Cycling Calories Calculator
- 1 Hour Lunch Break Calculator
- 1 Million in Numbers
- 1 Weeks Ago From Today
- 1 in 60 Rule Calculator
- 10 Day Payoff Calculator
- 10 Hour Shift Schedule Calculator
- 10 Minutes From Now
- 10 Months Ago From Today
- 10 to 1 Arm Workout Calculator
- 10207 2: Log Base 2 Calculator
- 1099 Hourly Rate Calculator
- 11 Months Ago From Today
- 11 Weeks Ago From Today
- 12 Hour Shift Pay Calculator
- 12 Months Ago From Today
Fee schedules, rates and rules change without notice. Always confirm important figures with the official source before you rely on them.