기본·수학

반올림 계산기

원하는 자리에서 반올림·올림·내림

반올림 계산기란?

지정한 자릿수에서 반올림·올림(切上)·내림(切下)을 계산하는 도구입니다. 소수점 이하 자리뿐 아니라 십의 자리·백의 자리 같은 정수 자릿수 지정도 가능합니다.

사용 방법

값과 자릿수를 입력합니다. 자릿수 2는 소수 둘째 자리까지 남기고, 0은 정수로, −2는 백의 자리에서 처리합니다. 반올림·올림·내림 중 방식을 선택하고 계산하기를 누릅니다.

공식·참고표

계수 factor = 10^자릿수를 사용해 round(value × factor) / factor (올림·내림은 Math.ceil/Math.floor로 치환) 방식으로 계산합니다.

예시 (값 1234.5678)
자릿수반올림올림내림
21234.571234.571234.56
0123512351234
−2120013001200
반올림 vs 올림 vs 버림 vs 은행가 반올림: 0.5는 왜 처리 방식마다 다르게 갈까

네 가지 방식은 모두 '지정한 자리 다음을 어떻게 처리할지'를 다르게 정합니다. 반올림은 다음 숫자가 5 이상이면 올리고 미만이면 버리며, 올림은 다음 숫자가 0이 아니면 무조건 위로, 버림(내림)은 다음 숫자를 무조건 잘라냅니다. 세 방식은 12.34처럼 다음 숫자가 정확히 5가 아닐 때는 결과가 갈리지 않는 경우도 많지만, 정확히 .5로 끝나는 값에서 반올림의 동작이 특히 논쟁적입니다.

일반적인 사사오입 반올림(이 계산기가 쓰는 방식)은 .5를 항상 위로 올립니다: 0.5→1, 1.5→2, 2.5→3, 3.5→4, 4.5→5. 하지만 은행가 반올림(banker's rounding, 짝수 반올림)은 .5를 가장 가까운 짝수로 반올림합니다: 0.5→0, 1.5→2, 2.5→2, 3.5→4, 4.5→4. 두 방식이 갈리는 지점은 정수부가 짝수일 때(0.5, 2.5, 4.5)뿐이며, 정수부가 홀수인 1.5나 3.5는 두 방식 모두 같은 결과를 냅니다.

이 차이가 실무에서 중요한 이유는, .5로 끝나는 값이 많이 몰린 데이터를 사사오입으로 처리하면 항상 위쪽으로만 쏠려 누적 오차가 생기기 때문입니다. 은행가 반올림은 위·아래로 고르게 분산시켜 이 누적 편향을 줄이는 목적으로 회계·통계 소프트웨어(예: 엑셀의 일부 함수, 파이썬 3의 기본 round())에서 채택됩니다. 이 계산기는 이해하기 쉬운 일반적인 사사오입 방식을 사용합니다.

What is the Rounding Calculator?

A tool for computing round, ceil, and floor at any specified digit — not just decimal places, but also tens, hundreds, and other integer place values.

How to use it

Enter a value and a digit. A digit of 2 keeps two decimal places, 0 rounds to an integer, and −2 operates at the hundreds place. Choose round, ceil, or floor, then press Calculate.

Formula & reference

Using a factor factor = 10^digit, the result is round(value × factor) / factor (substituting Math.ceil/Math.floor for ceil/floor mode).

Example (value 1234.5678)
DigitRoundCeilFloor
21234.571234.571234.56
0123512351234
−2120013001200
Round vs. ceil vs. floor vs. banker's rounding — why 0.5 splits opinions

All four methods differ only in how they treat what comes after the specified digit. Round rounds up if the next digit is 5 or greater and down otherwise; ceil always rounds up if anything nonzero remains; floor always truncates whatever follows. These three often agree when the next digit isn't exactly 5, but rounding behavior gets genuinely contested for values that end exactly at .5.

Standard "round half up" (the method this calculator uses) always rounds .5 upward: 0.5→1, 1.5→2, 2.5→3, 3.5→4, 4.5→5. Banker's rounding (round half to even), however, rounds .5 to the nearest even integer: 0.5→0, 1.5→2, 2.5→2, 3.5→4, 4.5→4. The two methods only diverge when the integer part is even (0.5, 2.5, 4.5) — for an odd integer part like 1.5 or 3.5, both methods agree.

This distinction matters in practice because rounding a dataset heavily populated with .5 values always upward with standard rounding introduces a cumulative upward bias. Banker's rounding spreads the rounding direction evenly up and down to cancel out that bias, which is why accounting and statistical software — including some Excel functions and Python 3's built-in round() — adopt it. This calculator uses the simpler, more familiar round-half-up method.

자릿수는 어떻게 입력하나요?
자릿수에 양수를 입력하면 소수점 이하 해당 자리에서, 0을 입력하면 소수점 첫째 자리에서 정수로, 음수를 입력하면 정수 부분의 십·백·천의 자리 등에서 처리됩니다. 예를 들어 자릿수 2는 소수 둘째 자리, 자릿수 −2는 백의 자리를 의미합니다.
반올림·올림·내림의 차이는 무엇인가요?
반올림은 지정 자리 다음 숫자가 5 이상이면 올리고 미만이면 버립니다. 올림(切上)은 값이 조금이라도 있으면 무조건 다음 자리로 올리며, 내림(切下)은 지정 자리 다음을 무조건 버립니다. 예를 들어 12.34를 소수 첫째 자리로 처리하면 반올림 12.3, 올림 12.4, 내림 12.3입니다.
음수를 입력해도 반올림 규칙이 같나요?
네, 이 계산기는 절대값 기준으로 자리를 계산한 뒤 부호를 유지합니다. 다만 올림과 내림은 음수에서 방향이 반대로 느껴질 수 있습니다. 예를 들어 −12.34를 소수 첫째 자리로 올림하면 −12.3(0에 더 가까운 쪽)이 됩니다.
은행가 반올림(banker's rounding)은 일반 반올림과 무엇이 다른가요?
일반 반올림(사사오입)은 딱 .5일 때 항상 위로 올리지만(2.5→3, 3.5→4), 은행가 반올림은 .5를 가장 가까운 짝수로 반올림합니다(2.5→2, 3.5→4). 딱 절반인 값이 많이 몰릴 때 항상 위로만 치우치는 오차를 줄이기 위해 회계·통계 프로그램에서 종종 사용됩니다. 이 계산기는 일반적인 사사오입 방식을 사용합니다.
How do I specify the digit?
A positive digit operates at that decimal place, 0 rounds to an integer, and a negative digit operates at the tens, hundreds, thousands place, etc. of the integer part. For example, digit 2 means the second decimal place, and digit −2 means the hundreds place.
What's the difference between round, ceil, and floor?
Round rounds up if the next digit is 5 or more, and down otherwise. Ceil always rounds up to the next place if there's any remainder, while floor always drops everything after the specified place. For example, processing 12.34 at one decimal place gives round 12.3, ceil 12.4, floor 12.3.
Do the rules stay the same for negative numbers?
Yes — this tool computes the place value based on the absolute value and then restores the sign. However, ceil and floor may feel reversed for negatives — for example, ceiling −12.34 at one decimal place gives −12.3 (closer to zero).
How does banker's rounding differ from standard rounding?
Standard rounding always rounds exactly .5 upward (2.5→3, 3.5→4), while banker's rounding rounds .5 to the nearest even integer (2.5→2, 3.5→4). It's often used in accounting and statistics software to reduce the cumulative upward bias that occurs when many values end exactly at .5. This calculator uses standard round-half-up.