Menu
×
   ❮   
HTML CSS JAVASCRIPT SQL PYTHON JAVA PHP C C++ C# AWS W3.CSS HOW TO BOOTSTRAP REACT MYSQL JQUERY EXCEL XML DJANGO NUMPY PANDAS NODEJS DSA TYPESCRIPT ANGULAR ANGULARJS GIT POSTGRESQL MONGODB ASP AI R GO KOTLIN SWIFT SASS VUE GEN AI SCIPY CYBERSECURITY DATA SCIENCE INTRO TO PROGRAMMING HTML & CSS BASH RUST TOOLS

Excel Tutorial

Excel HOME Excel Introduction Excel Get Started Excel Overview Excel Syntax Excel Ranges Excel Fill Excel Move Cells Excel Add Cells Excel Delete Cells Excel Undo Redo Excel Formulas Excel Relative Reference Excel Absolute Reference Excel Arithmetic Operators Excel Parentheses Excel Functions

Excel Formatting

Excel Formatting Excel Format Painter Excel Format Colors Excel Format Fonts Excel Format Borders Excel Format Numbers Excel Format Grids Excel Format Settings

Excel Data Analysis

Excel Sort Excel Filter Excel Tables Excel Conditional Format Excel Highlight Cell Rules Excel Top Bottom Rules Excel Data Bars Excel Color Scales Excel Icon Sets Excel Manage Rules (CF) Excel Charts

Excel PivotTables

Excel PivotTable Intro Excel Create PivotTable Excel PivotTable Values Excel PivotTable Filter Excel PivotTable Group Excel Calculated Field Excel PivotChart

Excel Case

Case: Poke Mart Case: Poke Mart, Styling

Excel Functions

AND AVERAGE AVERAGEIF AVERAGEIFS CONCAT COUNT COUNTA COUNTBLANK COUNTIF COUNTIFS DATEDIF FILTER HLOOKUP IF IFERROR IFS INDEX INDEX MATCH LEFT LEN LOWER MATCH MAX MEDIAN MID MIN MODE NETWORKDAYS NPV OR PROPER RAND RIGHT ROUND SORT STDEV.P STDEV.S SUBSTITUTE SUM SUMIF SUMIFS SUMPRODUCT TEXTJOIN TODAY TRIM UNIQUE UPPER VLOOKUP XLOOKUP XOR

Excel How To

Convert Time to Seconds Difference Between Times NPV (Net Present Value) Remove Duplicates

Excel Cert

Excel Certificate

Excel Examples

Excel Exercises Excel Syllabus Excel Study Plan Excel Training

Excel References

Excel Keyboard Shortcuts


Excel ROUND Function


Share

ROUND Function

The ROUND function is a premade function in Excel, which rounds a number to a given number of digits.

It is typed =ROUND and has the following parts:

=ROUND(number, num_digits)

Note: The different parts of the function are separated by a symbol, like comma , or semicolon ;

The symbol depends on your Language Settings.

Number: The number to round. This is usually a cell, like C2.

Num_digits: The number of digits to round to:

Num_digitsRounds toExampleResult
22 decimals=ROUND(1234.5678, 2)1234.57
11 decimal=ROUND(1234.5678, 1)1234.6
0Nearest whole number=ROUND(1234.5678, 0)1235
-1Nearest 10=ROUND(1234.5678, -1)1230
-2Nearest 100=ROUND(1234.5678, -2)1200
-3Nearest 1000=ROUND(1234.5678, -3)1000

A positive num_digits rounds to decimals. 0 rounds to a whole number. A negative num_digits rounds to the left of the decimal point, to tens, hundreds and so on.

Note: Numbers that are exactly halfway are rounded away from zero. =ROUND(2.5, 0) returns 3, and =ROUND(-2.5, 0) returns -3.

How to use the ROUND function:

  1. Select a cell (D2)
  2. Type =ROUND
  3. Double click the ROUND command
  4. Select the cell with the number to round (C2)
  5. Type (,)
  6. Type the number of digits (0)
  7. Hit enter

Let's have a look at an example!

The Poke Mart has a sale: everything is 12.5% off. These are the normal prices from the Poke Mart product list. Copy them and paste them into cell A1:

Example data

AB
1ItemPrice
2Poke Ball200
3Great Ball600
4Ultra Ball1200
5Potion300
6Super Potion700
7Revive1500
8Antidote100
9Awakening250

Type Sale Price in C1 and Rounded in D1.

Calculate the sale price in C2 with the formula =B2*(1-12.5%), and fill it down to C9. Some sale prices get decimals, like 262.5 and 218.75.

Poke Dollars have no cents, so round the sale prices to whole numbers. Type the ROUND formula in D2 and fill it down to D9:

ABCD
1ItemPriceSale PriceRounded
2Poke Ball200175175
3Great Ball600525525
4Ultra Ball120010501050
5Potion300262.5263
6Super Potion700612.5613
7Revive15001312.51313
8Antidote10087.588
9Awakening250218.75219
=ROUND(C2, 0)

218.75 is rounded to 219. 262.5 is exactly halfway, so it is rounded up to 263. Prices that are already whole numbers, like 175, stay the same.

You can also calculate and round in one step: =ROUND(B2*(1-12.5%), 0)



Round to Tens and Hundreds

Use a negative num_digits to round to tens or hundreds. -1 rounds to the nearest 10, and -2 rounds to the nearest 100. This is useful for simple, even prices.

Type Nearest 10 in E1 and Nearest 100 in F1. Then type the formulas in E2 and F2, and fill them down to row 9:

ABCDEF
1ItemPriceSale PriceRoundedNearest 10Nearest 100
2Poke Ball200175175180200
3Great Ball600525525530500
4Ultra Ball12001050105010501100
5Potion300262.5263260300
6Super Potion700612.5613610600
7Revive15001312.5131313101300
8Antidote10087.58890100
9Awakening250218.75219220200

The formula in E2:

=ROUND(C2, -1)

The formula in F2:

=ROUND(C2, -2)

175 is exactly halfway between 170 and 180, so it is rounded up to 180. For the same reason, 1050 is rounded up to 1100 in column F.

218.75 is rounded to 220 in column E, but to 200 in column F, because 218.75 is closer to 200 than to 300.


ROUNDUP and ROUNDDOWN

ROUND goes to the nearest value. If you always want to round in one direction, use ROUNDUP or ROUNDDOWN. They have the same parts as ROUND.

ROUNDUP always rounds away from zero. The Super Potion sale price in C6 is 612.5. ROUND to the nearest 10 gives 610, but ROUNDUP gives 620:

=ROUNDUP(C6, -1)

ROUNDDOWN always rounds toward zero. The Awakening sale price in C9 is 218.75. ROUND to a whole number gives 219, but ROUNDDOWN gives 218:

=ROUNDDOWN(C9, 0)

ROUND vs. Number Formats

You can also hide decimals with a number format, like the Decrease Decimal button. See Number Formats.

A number format only changes how the number looks. The value in the cell stays the same. ROUND changes the value itself.

This can make totals look wrong. Format C2:C10 to show no decimals, and add a total in row 10 with SUM:

ABCD
1ItemPriceSale PriceRounded
2Poke Ball200175175
3Great Ball600525525
4Ultra Ball120010501050
5Potion300263263
6Super Potion700613613
7Revive150013131313
8Antidote1008888
9Awakening250219219
10Total42444246

The formula in C10:

=SUM(C2:C9)

The formula in D10:

=SUM(D2:D9)

Columns C and D look the same, but the totals are different. C10 adds the real values, which are 4243.75 in total. The format shows it as 4244. D10 adds the rounded values, which gives 4246.

Note: Use ROUND when you want to calculate with the rounded value, like the price a customer pays. Use a number format when you only want the number to look shorter.


Free account

Track your progress

XP earned 0 Day streak 0 Spaces 0 League —

New

Learn in Adventure Mode W3Schools Adventure App

Coding fundamentals as bite-sized lessons and challenges.

×

Contact Sales

If you want to use W3Schools services as an educational institution, team or enterprise, send us an e-mail:
sales@w3schools.com

Report Error

If you want to report an error, or if you want to make a suggestion, send us an e-mail:
help@w3schools.com

W3Schools is optimized for learning and training. Examples might be simplified to improve reading and learning. Tutorials, references, and examples are constantly reviewed to avoid errors, but we cannot warrant full correctness of all content. While using W3Schools, you agree to have read and accepted our terms of use, cookies and privacy policy.

Copyright 1999-2026 by Refsnes Data. All Rights Reserved. W3Schools is Powered by W3.CSS.