Skip to content

Decimal Calculator

Written by Dr. Andrew Chen Dr. Andrew Chen, PhD in Computer Science
Reviewed by Prof. Omar Farooq Prof. Omar Farooq, PhD in Mechanical Engineering

Last updated 2026-08-22 · 5 cited sources

A decimal is a number written in base ten with a point separating the whole part from the fraction, each place to the right of the point worth one tenth of the place to its left — so 3.75 is three wholes, seven tenths and five hundredths. This calculator adds, subtracts, multiplies or divides two decimals and rounds the answer to the number of places you choose.

Four fields: the first number, one of four operations, the second number, and how many decimal places the answer should carry. All four must be filled before the tool runs, so the page opens with an empty panel. The answer is one line — the word Result and the figure at exactly that precision. Enter 12.75, Addition, 3.4 and 2 places and the panel reads Result: 16.15.

Rounding is the part worth watching. The setting pads as well as trims — 2.5 × 1.2 at two places prints Result: 3.00 — and because the arithmetic runs in binary, a figure sitting on an exact half does not always round up.

Decimal Calculator

Enter your values below.

Calculation Result

Enter your details and press “Calculate” to see your results.

The result is calculated based on the selected arithmetic operation between the two decimal numbers, rounded to the specified number of decimal places.

What Is a Decimal?

Wolfram MathWorld puts the definition in one line: decimal is the base-10 notational system for representing real numbers. The point is a boundary marker inside that system. Left of it the places grow by tens; right of it they shrink by tens. Nothing else about the number changes when the point appears, which is why decimal arithmetic uses the same carries and borrows as whole-number arithmetic.

Place Value: What Each Digit After the Point Is Worth

Every step to the right divides the previous place by ten. That single rule is the whole system. Pull 3142.856 apart digit by digit and it comes out like this.

DigitPlaceWorth as a fractionWorth as a number
3Thousands3 × 10003000
1Hundreds1 × 100100
4Tens4 × 1040
2Ones2 × 12
8Tenths8/100.8
5Hundredths5/1000.05
6Thousandths6/10000.006

Add the seven parts back together and 3142.856 returns exactly: 3000 + 100 + 40 + 2 + 0.8 + 0.05 + 0.006. The names on the right of the point mirror the names on the left, which is the mnemonic worth keeping — tenths sit opposite tens, hundredths opposite hundreds, thousandths opposite thousands. There is no oneths place, because the ones column is the hinge the mirror turns on.

The Point, the Leading Zero, and Trailing Zeros

Three conventions travel with the notation, and two of them are written down. NIST's guidance on writing SI units states that the dot or period is used as the decimal point within numbers, and that for numbers less than one, a leading zero should be written before the decimal point — 0.038 g, not .038 g. Much of Europe uses a comma in the same position, so 3,75 on a German invoice means three and three quarters, not three thousand seven hundred fifty.

The third convention concerns zeros on the end. Mathematically 3.5, 3.50 and 3.500 are one number. In measurement they are three different claims, because 3.500 says the instrument resolved thousandths. This tool always fills the width you ask for: 24.5 ÷ 7 at two places comes back as Result: 3.50, and the same division at one place returns Result: 3.5. The extra zero is formatting, not new precision.

Terminating, Repeating and Irrational Decimals

Rational numbers — anything writable as one whole number over another — produce exactly two kinds of decimal. MathWorld states that all rational numbers have either finite decimal expansions or repeating decimals, and defines a repeating decimal as a number whose decimal representation eventually becomes periodic. That periodicity is what 1/3 = 0.333… and 1/7 = 0.142857142857… are doing.

Which of the two you get is decided by the denominator alone. A fraction in lowest terms terminates only when its denominator factors into 2s and 5s and nothing else — MathWorld's regular numbers, written p / (2^α × 5^β). Eighths terminate because 8 = 2 × 2 × 2. Twentieths terminate because 20 = 2 × 2 × 5. Thirds, sevenths and ninths never do, because they bring in a prime that ten cannot absorb. Irrational numbers such as π and √2 are a third case entirely: they neither terminate nor repeat, so every decimal written for them is already an approximation.

Decimal, Fraction and Percent Name the Same Number

Three quarters, 0.75 and 75% are one value wearing three costumes. Divide the top of a fraction by the bottom and you have the decimal; multiply the decimal by 100 and you have the percent. Which costume is right depends on the job — a percent for a rate, a decimal for arithmetic, a fraction for a tape measure or a recipe.

Decimal Calculator

Traffic runs both ways, and the return trip is a separate job: turning 0.6875 back into 11/16 takes a different procedure from the division that produced it. That one belongs to the Decimal to Fraction Calculator.

How Do You Calculate With Decimals?

The arithmetic is ordinary arithmetic. What decimals add is a bookkeeping question — where does the point end up? — and each of the four operations answers it differently. Addition and subtraction line the points up. Multiplication counts them. Division moves them.

The Decimal Formula for Each Operation

Set out as instructions rather than symbols, the rules fit on a single card.

ADDITION AND SUBTRACTION
  Line up the two decimal points.
  Pad the shorter number with trailing zeros so both have the same width.
  Add or subtract column by column, carrying or borrowing as usual.
  Bring the decimal point straight down into the answer.

MULTIPLICATION
  Ignore both points and multiply the digits as whole numbers.
  Count the decimal places in the first factor (d1) and in the second (d2).
  Place the point so the answer carries d1 + d2 decimal places.

DIVISION
  Shift the divisor's point right until the divisor is a whole number.
  Shift the dividend's point right by the same number of places.
  Divide as usual and bring the point straight up into the quotient.

ROUNDING (what the Decimal Places field does)
  answer = round(raw result, p)
  where p is the number of places you asked for

The calculator does not walk through those steps. It evaluates the operation in full and then formats the outcome to p places. The steps still matter, because they are how you check the answer by hand, and because the multiplication rule predicts a result that catches people out: two factors carrying one decimal place each produce an answer carrying two.

Adding and Subtracting, Step by Step

Take 12.75 + 3.4. Written one above the other the widths do not match, so pad the second number to 3.40. Then work right to left: 5 + 0 = 5 hundredths, 7 + 4 = 11 tenths so write 1 and carry 1, 2 + 3 + 1 = 6, and 1 + 0 = 1. The point drops straight down between the 6 and the 1. Enter 12.75, Addition, 3.4 and 2 decimal places and the panel returns Result: 16.15.

Padding is the step people skip. Line the 4 of 3.4 up under the 5 of 12.75 instead of under the 7 and you have added 0.04 where 0.40 belongs, which gives 15.79. Subtraction borrows the same way: for 6.2 − 3.75, pad the first number to 6.20, borrow a tenth so that 10 hundredths minus 5 gives 5, then borrow again in the tenths column. The tool prints Result: 2.45.

Multiplying, Step by Step

Multiplication ignores the points until the very end. For 2.5 × 1.2, drop both points and multiply 25 × 12 = 300. The first factor has one decimal place and the second has one, so the answer needs two, giving 3.00 — which is 3. At two decimal places the panel returns Result: 3.00, because the setting is a fixed width rather than a maximum.

Counting places also tells you how long an answer will be before you compute it. 9.99 carries two places and 0.07 carries two, so the product must land on four: 999 × 7 = 6993, and four places puts it at 0.6993. Ask for four decimal places and the panel returns Result: 0.6993. Ask for two and it returns Result: 0.70.

Dividing, Step by Step

Division is the one operation where the point moves before you start. For 45.6 ÷ 1.2 the divisor has one decimal place, so shift both numbers one place right and you have 456 ÷ 12 — a whole-number division that gives 38 exactly. At two decimal places the panel returns Result: 38.00. Shifting both numbers by the same amount is what keeps the quotient unchanged; shift only the divisor and 45.6 ÷ 12 gives 3.8, an answer ten times too small.

Most divisions are not that tidy. 7 ÷ 3 has no finite decimal at all, so the Decimal Places field stops deciding cosmetics and starts deciding the answer: four places returns Result: 2.3333, and the true value carries on. Dividing by zero is the one case with nothing to round — the readout shows ∞ with the line Division by zero beneath it.

When a division is meant to end in a whole number and a remainder rather than in more decimal places — 47 pencils shared among 6 children — the decimal answer is the wrong shape, and the tool you want is the Division Calculator.

Worked Example: Sales Tax on a $9.99 Item at 7%

A price of 9.99 and a rate written as the decimal 0.07. Set First Decimal Number to 9.99, choose Multiplication, set Second Decimal Number to 0.07, put 4 in Decimal Places and press Calculate. The panel returns Result: 0.6993 — the exact tax, resolved to a hundredth of a cent.

No register charges 0.6993 dollars. Change Decimal Places to 2, press Calculate again, and you get Result: 0.70. That is the figure the receipt carries, and the distance between the two runs is the whole point of having the control. Finish the job with a second calculation: 9.99, Addition, 0.7, two places, which returns Result: 10.69.

Decimal Examples for All Four Operations

Every row below was run in the calculator on this page. The final column is the literal text the readout shows, padding zeros included.

First numberOperationSecond numberDecimal placesPanel readout
12.75Addition3.42Result: 16.15
6.2Subtraction3.752Result: 2.45
2.5Multiplication1.22Result: 3.00
45.6Division1.22Result: 38.00
19.99Multiplication32Result: 59.97
9.99Multiplication0.074Result: 0.6993
3.14159Multiplication24Result: 6.2832
0.125Addition0.3753Result: 0.500
7Division34Result: 2.3333
1Division710Result: 0.1428571429
-4.5Addition2.252Result: -2.25
0Division52Result: 0.00
5Division02

Two rows deserve a second look. 0.125 + 0.375 is exactly one half, and at three places it still prints Result: 0.500, because the setting fixes the width. The final row is the only one that returns no Result line at all: a zero divisor puts ∞ in the readout and adds a single line under it reading Division by zero. A zero in the first field is ordinary — 0 ÷ 5 gives Result: 0.00.

Money: Two Places, Every Time

A dollar divides into a hundred cents, so money arithmetic lives at exactly two decimal places and nowhere else. Three shapes account for most of it: a quantity against a unit price, where 19.99 × 3 at two places returns Result: 59.97; a rate applied as a decimal, where 9.99 × 0.07 gives the tax; and a bill split, where 24.5 ÷ 7 at two places returns Result: 3.50.

A rate has to become a decimal before it enters either number field — 7% is 0.07, 15% is 0.15, 2.5% is 0.025. If you would rather type the percent sign and skip that conversion, the tool built for it is the Percentage Calculator.

Measurements: Match the Precision of the Instrument

A caliper that reads to 0.01 mm cannot justify an answer quoted to 0.0001 mm, and a kitchen scale that reads whole grams cannot justify tenths. The working convention is that a computed figure carries no more precision than the least precise measurement that fed it. Choose Decimal Places to match the instrument, not to match the length of the raw quotient.

Type 3.14159 as the first number, multiply by 2, ask for four places, and the panel returns Result: 6.2832. Ask for ten and it returns Result: 6.2831800000, a figure that claims accuracy to a ten-billionth while resting on a value of π that was cut off after five decimal places. The trailing zeros are not measurement; they are the field filling the width it was given.

When the Answer Never Finishes

Some divisions have no last digit. 1 ÷ 7 repeats the block 142857 forever, and at ten decimal places the panel returns Result: 0.1428571429 — that closing 9 is a rounded 8, because the digits carrying on behind it start with 5. 2 ÷ 3 repeats a single digit and returns Result: 0.6666666667 at the same setting.

The distinction between rounding and truncating matters when you check an answer against a printed table. A tool that truncated would show 0.6666666666. This one rounds, so it shows 0.6666666667. The two agree to within a ten-billionth, but only one of them matches what a reference table computed the same way will print.

Decimal Chart: Places, Fractions and Percents

Three reference tables follow: what each decimal-place setting is worth, the fraction conversions worth committing to memory, and one number shown at every setting the field offers.

What Each Decimal Place Is Worth

The Decimal Places field carries a minimum of 0 and a maximum of 10. Settings from 1 to 10 give exactly that many digits after the point, and each step adds a digit worth a tenth of the one before it.

PlacesPlace nameSmallest unit shownWritten out
1Tenths1/100.1
2Hundredths1/1000.01
3Thousandths1/1,0000.001
4Ten-thousandths1/10,0000.0001
5Hundred-thousandths1/100,0000.00001
6Millionths1/1,000,0000.000001
7Ten-millionths1/10,000,0000.0000001
8Hundred-millionths1/100,000,0000.00000001
9Billionths1/1,000,000,0000.000000001
10Ten-billionths1/10,000,000,0000.0000000001

Two places is money. Three is the usual home for a length in meters or a mass in kilograms. Four to six is laboratory and machining territory. Past six you are almost always beyond the precision of whatever produced the inputs, and the extra digits are decoration rather than information.

Common Fractions as Decimals and Percents

These conversions surface constantly, and knowing them cold turns a whole class of decimal problems into instant answers.

FractionDecimalPercent
1/160.06256.25%
1/100.110%
1/80.12512.5%
1/60.1666…16.67%
1/50.220%
1/40.2525%
1/30.3333…33.33%
3/80.37537.5%
1/20.550%
5/80.62562.5%
2/30.6666…66.67%
3/40.7575%
7/80.87587.5%

Notice which rows carry an ellipsis. Sixths, thirds and ninths never finish, because 3 is not a factor of ten; sixteenths, eighths, quarters, fifths and tenths always do. Any row can be reproduced here — numerator in the first field, Division, denominator in the second — so 1 ÷ 3 at ten places returns Result: 0.3333333333, while 1 ÷ 16 at four places lands on the exact 0.0625.

One Number at Every Setting

2 ÷ 3 is the clearest way to watch the Decimal Places control work, because the true value never ends and every setting therefore changes the answer rather than its appearance. Both columns below came from the same two numbers with only the third field altered.

Decimal placesReadout for 2 ÷ 3Readout for 22 ÷ 7
1Result: 0.7Result: 3.1
2Result: 0.67Result: 3.14
3Result: 0.667Result: 3.143
4Result: 0.6667Result: 3.1429
5Result: 0.66667Result: 3.14286
6Result: 0.666667Result: 3.142857
10Result: 0.6666666667Result: 3.1428571429

The right-hand column is the schoolroom approximation of π, and the table shows precisely where it stops being one. At two places it gives 3.14, which is correct. At three it gives 3.143 against π's 3.142, and every setting below that is wrong from the third decimal onward. More places bought no more accuracy — the approximation ran out long before the calculator did.

How to Read Your Result

The panel is deliberately thin. There is no gauge, no category label and no breakdown — one line, plus whatever you can tell from the four fields that produced it.

The One Line the Readout Returns

A successful calculation prints a single readout: the word Result, a colon, and the figure at the precision you set. Nothing appears underneath it, because the formula returns one segment and the breakdown list therefore stays empty. A Copy result button sits below the readout and puts that same text on the clipboard.

Because all three number fields start empty, the page opens showing a dash and a prompt rather than a pre-filled example. Press Calculate to run it. The tool does not recompute while you type, so after changing any field press Calculate again — reading a stale figure next to freshly edited inputs is the easiest mistake to make here.

Choosing the Decimal Places Setting

Pick the setting from what the answer is for, not from what looks neat. Money takes 2. A figure you are about to feed into a second calculation takes more places than the final answer needs, so that rounding happens once at the end instead of at every step. A quick sanity check takes 1 or 2.

Two behaviors of the field are worth knowing before you lean on it. A setting of 0 does not strip the decimals: the field falls back to two places, so 100 ÷ 3 at 0 returns Result: 33.33 rather than Result: 33, and 12.75 + 3.4 at 0 still returns Result: 16.15. To reach a whole number, read the two-place figure and round it yourself. A fractional setting is cut back to a whole number of places, so typing 3.9 gives three places and 2 ÷ 3 returns Result: 0.667.

Blank Fields, Zero Divisors and the Amber Notice

Three different things can stop you getting a number, and each is caught at a different point.

  • A blank box is caught before the formula runs, and the amber notice names whichever fields are actually empty. Leave the second number out and it reads: Enter a value for Second Decimal Number. Leave two out and it lists both, in the order they appear on the form: Enter a value for: First Decimal Number, Decimal Places.
  • A zero divisor gets past that check and is caught inside the formula. It does not produce the amber notice — the readout shows ∞ with Division by zero on the line beneath, because dividing by zero has no answer to round to any width.
  • A zero anywhere else is a perfectly good input. 0 ÷ 5 at two places returns Result: 0.00, and adding 0 to a number is how you round a single figure here without changing its value.

The Operation control cannot be blank. It renders as a four-button group with Addition (+) already selected, so a calculation always carries an operation even if you never touch that row.

Checking the Answer Without a Calculator

Round both inputs hard and redo the sum in your head. 12.75 + 3.4 is roughly 13 + 3, so 16.15 is believable while 1.615 and 161.5 are not. For multiplication, count the places: 9.99 × 0.07 has four between them and the answer must begin in the tenths, so 0.6993 fits and 6.993 cannot. For division, ask which side of the starting number the answer should land on — dividing by anything below 1 makes it bigger, dividing by anything above 1 makes it smaller.

Limits: When This Calculator Does Not Apply

Four limits: two about the scope of the arithmetic, two about the machine underneath it.

Binary Storage: Why an Exact Half Sometimes Rounds Down

The rule taught in school is that a 5 in the next place rounds up. This calculator follows it most of the time and departs from it in a way worth understanding, because every tool built on the same floating-point arithmetic departs in the same places.

Numbers are held in binary, and most decimal fractions have no exact binary form. Typing 1.005 stores 1.0049999999999998934, which is genuinely below the halfway mark, so two places gives Result: 1.00 rather than 1.01. The same catches 2.675, which returns Result: 2.67; 8.995, which returns Result: 8.99; and 0.045, which returns Result: 0.04. Others land on the upper side and behave as taught: 2.35 at one place returns Result: 2.4, and 12.345 at two returns Result: 12.35. MDN documents this for the exact rounding function the tool uses, noting that 2.55 rounds down at one place because the value cannot be represented exactly by a float and the closest representable float is lower.

Fractions whose denominators are powers of two are immune, because they are exact in binary — 0.125 at two places rounds up to Result: 0.13 every time. If a figure has to round half-up without exception, round it yourself at each step rather than reading the last digit off a long quotient.

Two Numbers, One Operation, No Order of Operations

There is no third field and no expression box. Something like 2.5 + 1.5 × 4 cannot be typed in one go; it has to be split across two runs, and you have to run the multiplication first yourself, because four fields carry no way to express precedence. Parentheses, exponents and roots are outside the same boundary.

Chaining costs precision as well as time: whatever you round at step one is what step two starts from. Carry the intermediate result at more places than the final answer needs and round once at the end. Negative operands, at least, are fine — the two number fields accept a leading minus, and -4.5 + 2.25 returns Result: -2.25.

Fractions, Percent Signs and Thousands Separators Are Not Read

Both number fields are numeric inputs, so 3/4, 75% and 1,250.50 will not survive being typed into them. Convert before you enter: 3/4 is 0.75, 75% is 0.75, and 1,250.50 goes in as 1250.5. Anything the browser cannot read as a number leaves the box empty, and an empty box is reported as a missing field rather than as a bad one — which is why a mistyped value produces a request to fill the field in rather than a complaint about its contents.

Scientific notation is the one shorthand these fields do accept. 1e5 is read as 100000, so 1e5 + 1 at two places returns Result: 100001.00.

What the Fields Accept That the Formula Cannot Use

Decimal Places is marked with a minimum of 0 and a maximum of 10, but the form is submitted with browser validation turned off, so those numbers guide the up and down arrows rather than gate the value. Typed settings outside the range still reach the formula, and they do not all behave.

  • A negative setting stops the calculation outright. Type -2 and the amber notice reads: Something went wrong with that calculation. Please check your values and try again.
  • A setting above 10 is accepted and honored. 2 ÷ 3 at 20 places returns Result: 0.66666666666666662966 — real digits of the stored binary value, which stops agreeing with two thirds after the sixteenth place.
  • A number at or beyond 1e21 is printed in exponential form and the places setting is ignored entirely: 1e21 as the first number, Addition, 0 as the second, returns Result: 1e+21.

None of the three is reachable by clicking the field's own arrows, which step only between 0 and 10. All three are reachable by typing, so a stray keystroke in that box is worth a second glance before you trust the line above it.

Frequently Asked Questions

How do you calculate decimals by hand?

For addition and subtraction, line up the decimal points and pad the shorter number with zeros: 12.75 + 3.40 = 16.15. For multiplication, ignore the points, multiply as whole numbers, then give the answer as many decimal places as both factors carried together — 2.5 × 1.2 becomes 25 × 12 = 300 with two places, so 3.00. For division, shift both points right until the divisor is whole: 45.6 ÷ 1.2 becomes 456 ÷ 12 = 38.

What does this calculator return for 0.1 + 0.2?

Result: 0.30 at two decimal places, and Result: 0.3000000000 at ten. The well-known floating-point error in 0.1 + 0.2 is real — the stored sum is 0.30000000000000004 — but it sits in the seventeenth decimal place, far past the ten places this field offers, so it never reaches the readout.

Why does the answer have extra zeros on the end?

The Decimal Places setting is a fixed width, not a maximum, so every answer is padded to it. At two places, 2.5 × 1.2 prints Result: 3.00 and 24.5 ÷ 7 prints Result: 3.50. Lower the setting to remove them: 24.5 ÷ 7 at one place returns Result: 3.5.

What happens if I set Decimal Places to 0?

You get two places rather than a whole number. 12.75 + 3.4 at a setting of 0 returns Result: 16.15, and 100 ÷ 3 returns Result: 33.33. The field treats 0 as no answer given and applies its default of two places, so to reach a whole number you read the two-place figure and round it yourself.

What does the calculator do if I divide by zero?

It declines to produce a number. The readout shows the infinity symbol ∞ with the line Division by zero underneath. Division by zero is undefined, so there is nothing to round to any width. A zero in the first field is ordinary arithmetic: 0 ÷ 5 at two places returns Result: 0.00.

Which fractions become terminating decimals?

Only those whose denominator, in lowest terms, factors into 2s and 5s. That covers halves, quarters, fifths, eighths, tenths, sixteenths and twentieths — 1/16 is exactly 0.0625. Any other prime in the denominator makes it repeat forever: 1/3 is 0.333…, 1/6 is 0.1666…, and 1/7 repeats the block 142857. MathWorld calls the terminating ones regular numbers, of the form p / (2^α × 5^β).

Why did 1.005 round to 1.00 instead of 1.01?

Because 1.005 is not exactly 1.005 once it is stored in binary. The machine holds 1.0049999999999998934, which is below the halfway mark, so two places rounds down. The same happens to 2.675, which returns Result: 2.67, and to 8.995, which returns Result: 8.99. Values that are exact in binary behave as expected: 0.125 at two places returns Result: 0.13.

How many decimal places should I use?

Two for money, because a cent is one hundredth of a dollar. For measurements, match the instrument — a caliper reading hundredths of a millimeter does not justify an answer to four places. For an intermediate step inside a longer calculation, use more places than the final answer needs and round once at the very end, since rounding at every step compounds the error.

Can I enter three numbers or a whole expression?

No. The form holds two numbers and one operation, so 2.5 + 1.5 × 4 has to be split into two runs, and you have to do the multiplication first yourself because there is no order-of-operations handling. Carry more decimal places through the intermediate step than the final answer needs.

Sources & References

  1. [1] Weisstein, E.W. Decimal — Wolfram MathWorld
  2. [2] Weisstein, E.W. Repeating Decimal — Wolfram MathWorld
  3. [3] Weisstein, E.W. Regular Number — Wolfram MathWorld
  4. [4] National Institute of Standards and Technology Writing SI (Metric System) Units — decimal marker and leading zero — NIST Office of Weights and Measures
  5. [5] Mozilla Developer Network Number.prototype.toFixed() — MDN Web Docs

Methodology. This calculator uses standard, peer-reviewed mathematical formulas. It is reviewed and maintained by the Vast Calculators editorial team.

Last updated ·

Results are estimates for general use; verify critical figures independently.

What to Work Out Next

See all Math Calculators