Lelifi·tools

Math Calculator

For 12 and 8 the sum is 20, the product is 96, and the quotient is one and a half. The average is 10, the difference is 4, and the ratio 12 to 8 reduces to 3 : 2, so 12 is 150 percent of 8.

Enter any two numbers. Every basic result comes back in one pass, and each row is labeled with the operation that produced it.

Type any two numbers and get the sum, difference, product, quotient, remainder, average, percent comparison and reduced ratio at once, with each result labeled.

By the Lelifi editors ·

Key takeaways

One pair of numbers, several answersfirst number12second number8sum20difference4product96quotient1.5average10
A single pair of inputs feeds every row of the calculator.
12 as a share of 8 is 150 percent8 = 100 percent12 = 150 percentone whole = 8one and a half = 12
Twelve drawn against a base of eight: one and a half wholes.
On this page
  1. What one pair of numbers can answer
  2. Sum and difference keep their units
  3. Product, quotient and the number left over
  4. Average and percent from the same pair
  5. Ratio in lowest terms
  6. Squares, roots and the diagonal
  7. Worked example: checking a restaurant bill
  8. When two numbers are not enough

What one pair of numbers can answer

Most everyday math starts with two numbers. A paycheck and a rent check. A board 12 inches long and a shelf 8 inches deep. A recipe for four people and a table of ten. The same pair can be added, subtracted, multiplied and divided, and each operation answers a different question about it.

The table below uses 12 and 8 as a standing example. The calculator above runs every row with whatever numbers you type, so the results sit side by side instead of being scattered across separate pages.

OperationSymbolQuestion it answersResult for 12 and 8
Suma + bHow much in total20
Differencea - bHow far apart the two are4
Producta x bHow much after scaling one by the other96
Quotienta / bHow many times b fits into a1.5
Remaindera mod bWhat is left after whole groups4
Average(a + b) / 2The even split of the pair10
Percenta / b x 100a as a share of b150 percent
Ratioa : bThe pair in lowest terms3 : 2
Combined squarea squared plus b squaredThe square of the diagonal208

Two habits keep the results honest. Write the unit next to each number before you start, and decide which operation matches the question before you read the answer. A sum of 20 dollars and a product of 96 square feet describe different things, even when both come from the same pair.

Sum and difference keep their units

Addition combines two amounts of the same kind: 12 + 8 = 20. Order does not matter here, so 8 + 12 gives the same 20. Subtraction compares the two amounts: 12 - 8 = 4, while 8 - 12 = -4. The minus sign records direction, and a negative result is a real answer rather than a mistake.

Money makes the sign easy to read. A bill of 84 dollars with a 15 dollar coupon leaves 84 - 15 = 69 dollars to pay. If the coupon were worth 100 dollars, the same subtraction gives -16, which means the coupon is larger than the order and the store would owe change or the coupon cannot be used on that purchase.

Units have to match before either operation runs. Adding 12 dollars to 8 hours produces 20 of nothing useful. Convert one side first, then add or subtract.

First numberSecond numberSumDifference
128204
-128-4-20
12-8420
-12-8-20-4

Read the table by columns. The sum always moves in the direction of the larger amount, while the difference always runs from the second number to the first. Swapping the two inputs flips the sign of the difference and leaves the sum alone, which is a quick way to catch a keying error.

Product, quotient and the number left over

Multiplication scales one number by another: 12 x 8 = 96. If a shelf is 12 inches wide and you line up 8 rows of that length, you cover 96 inches of shelf. Division splits the same total: 12 / 8 = 1.5, so 8 goes into 12 one and a half times.

When both inputs are whole numbers and the answer has to be whole as well, the remainder carries the part that does not divide evenly. Eight goes into 12 once, with 4 left over, and 1 x 8 + 4 = 12. The calculator reports that leftover separately, next to the decimal quotient, so you can see both forms at the same time.

Rounding direction depends on what you are buying. Tile that covers 8 square feet per box needs 96 / 8 = 12 boxes, an exact fit. Paint that covers 400 square feet per gallon needs 1.5 gallons for 600 square feet, and the store sells whole cans, so you buy 2. Round up when a shortfall stops the job, and round down only when the leftover has no use.

Division by zero has no answer. The calculator marks that row as undefined instead of printing a misleading zero.

Average and percent from the same pair

The average of the pair is the total split evenly: (12 + 8) / 2 = 10. It sits halfway between the two numbers, so 12 is 2 above it and 8 is 2 below it. That balance is the whole idea behind an average, and it is why one large value pulls the average toward itself.

Percent compares the pair as a share. Divide the first number by the second and multiply by 100: 12 / 8 = 1.5, so 12 is 150 percent of 8. Turn the pair around and 8 / 12 = 0.6667, so 8 is 66.7 percent of 12. Both statements are true at the same time, which is why the order of the two numbers matters when you talk about percent.

Percent and percentage points are not the same thing. A rate that moves from 8 percent to 12 percent rises by 4 percentage points, and that is a 50 percent increase, because 4 / 8 = 0.5. Report the unit you mean, or the number will be read the wrong way.

PairFirst as percent of secondSecond as percent of first
12 and 8150 percent66.7 percent
50 and 20025 percent400 percent
30 and 30100 percent100 percent
5 and 2250 percent40 percent

Ratio in lowest terms

A ratio compares two amounts without saying how large either one is. The pair 12 and 8 shares a common factor of 4, so both sides divide by 4 and the ratio becomes 3 : 2. The calculator finds that factor for you and shows the reduced form, which is the version most recipes, mixing charts and screen sizes use.

Reducing does not change the relationship. A recipe that calls for 3 cups of flour to 2 cups of sugar scales to 12 cups of flour and 8 cups of sugar, and the ratio stays 3 : 2 at every size. That is the useful part: one small pair of numbers describes every batch.

Ratios only reduce cleanly when both sides are whole numbers. A pair like 2.5 and 4 has no integer common factor, so the calculator marks the ratio row as not available and leaves the decimal quotient in place.

PairCommon factorRatio in lowest terms
12 and 843 : 2
16 and 9116 : 9
45 and 30153 : 2
100 and 75254 : 3

Squares, roots and the diagonal

Squaring a number multiplies it by itself: 12 squared is 144 and 8 squared is 64. Added together they give 208, and the square root of 208 is about 14.42. That last number is the diagonal of a rectangle that measures 12 by 8, which is the Pythagorean theorem in one line.

In a room that is 12 feet by 8 feet, the distance from one corner to the opposite corner is 14.42 feet. The same arithmetic sizes a television, checks whether a couch fits through a doorway on the diagonal, and finds the straight-line distance between two points on a map grid.

Keep the units attached through the square and the root. Squaring feet gives square feet, and taking the root brings the answer back to feet. A diagonal reported in square feet is a sign that the root step was skipped. The NIST guide to the SI covers how units behave under multiplication and division, which is the rule this row follows.

Worked example: checking a restaurant bill

A table of two splits a bill of 84 dollars, with 8 percent sales tax and a 15 percent tip on the food total. Run each piece with the calculator instead of guessing at the total.

Tax: enter 84 and 8, and the percent row gives 6.72. Tip: enter 84 and 15, and the percent row gives 12.60. Add the three amounts: 84 + 6.72 + 12.60 = 103.32. Split two ways: 103.32 / 2 = 51.66 per person.

The average row answers a different question, and it is worth seeing why. The average of 84 and 103.32 is 93.66, which is the midpoint of the bill and the total, not the amount anyone pays. Read the label on each row before using the number.

Restaurants in the United States often print a suggested tip table based on the pre-tax amount, and state tax rules decide whether a discount is applied before tax. The Consumer Price Index from the Bureau of Labor Statistics is the official source for how prices and tax-inclusive costs move over time, and it uses the same percent change arithmetic shown on this page.

When two numbers are not enough

This page handles a single pair. Several everyday questions need more than that, and the right tool is usually one click away. A price that moves from one value to another needs the percentage change calculator. A list of test scores needs the average calculator, which accepts any number of values. Fractions that have to be added or reduced belong in the fraction calculator, and a comparison of three or more quantities belongs in the ratio calculator.

Rounding deserves its own step. A quotient like 1.5 becomes 2 when the answer has to be a whole can of paint, and stays 1.5 when it is a rate. The rounding calculator handles the place value, and the NIST publication above gives the conventions used in published measurements.

For long expressions with powers, roots and brackets, the scientific calculator applies the order of operations to the whole line. This page keeps each operation separate on purpose, so a single wrong keystroke cannot hide inside a longer expression.

Finally, decide what the answer is for. A number used to buy materials needs a unit and a rounding rule. A number used to compare two options needs the same unit on both sides. A number used to explain a result to someone else needs the formula written down next to it. The calculator gives you the arithmetic; the unit and the rounding are still your call.

Frequently asked questions

What does this math calculator do?

It takes two numbers and returns the sum, difference, product, quotient, remainder, average, percent comparison, reduced ratio and combined square in one pass.

What is 12 plus 8?

The sum is 20.

What is 12 minus 8?

The difference is 4. Reversing the order gives -4, which points the other way.

What is 12 times 8?

The product is 96.

What is 12 divided by 8?

The quotient is 1.5, which is one and a half. In whole numbers, 8 goes into 12 once with a remainder of 4.

How do I find the average of two numbers?

Add them and divide by 2. For 12 and 8 the average is 10, which sits 2 above 8 and 2 below 12.

What percent of 8 is 12?

It is 150 percent, because 12 / 8 = 1.5. The reverse, 8 as a percent of 12, is 66.7 percent.

How do I simplify the ratio 12 to 8?

Divide both sides by their greatest common factor, which is 4, to get 3 : 2.

Why does the remainder row say not available for some inputs?

The remainder is only defined for whole numbers. A pair such as 2.5 and 4 has no whole-number remainder, so the row is left blank.

What happens if I divide by zero?

There is no answer. The quotient and percent rows report that the result is undefined instead of showing a false zero.

Can I enter decimals and negative numbers?

Yes. Decimals work in every row, and negative numbers are allowed for the sum, difference and product. Percent and ratio need a positive second number to be meaningful.

How many decimals does the page show?

Up to 6 decimal places, with trailing zeros removed, so 1.5 stays 1.5 and 0.666667 is rounded from a longer value.

What is 12 squared plus 8 squared?

It is 208. The square root of 208 is about 14.42, the diagonal of a 12 by 8 rectangle.

Is this the same as a scientific calculator?

No. A scientific calculator evaluates a whole expression with powers, roots and brackets. This page keeps each operation on its own row for a single pair of numbers.

Spotted a wrong number or a broken result?

More Everyday tools

See all Everyday tools

Fee schedules, rates and rules change without notice. Always confirm important figures with the official source before you rely on them.