기본·수학

로그 계산기

다양한 밑의 로그값을 계산

로그 계산기란?

로그(log)는 어떤 수(밑, base)를 몇 번 거듭제곱해야 다른 수(진수, x)가 되는지를 나타내는 값입니다. 즉 log_b(x) = yb^y = x를 의미합니다. 이 계산기는 상용로그(밑10)·자연로그(ln, 밑e)·이진로그(밑2) 프리셋과 임의의 커스텀 밑을 모두 지원합니다.

사용 방법

진수(x)에 계산할 양수를 입력하고, 밑 프리셋 버튼(10·e·2)을 누르거나 밑 입력란에 원하는 값을 직접 입력한 뒤 계산하기를 누릅니다. x는 0보다 커야 하고, 밑은 0보다 크면서 1이 아니어야 합니다.

공식·참고표

밑 변환 공식: log_b(x) = ln(x) / ln(b). 밑이 10이면 상용로그(log₁₀), 밑이 e(≈2.71828)이면 자연로그(ln), 밑이 2이면 이진로그(log₂)라고 부릅니다.

대표 값
결과
log₁₀(100)2
ln(e)1
log₂(8)3
데시벨·지진 규모·pH가 로그 스케일인 이유

소리 세기가 10배 커질 때 데시벨(dB)은 10log₁₀(세기비)로 정의되어 있어 딱 10dB만 오릅니다. 세기가 100배면 10log₁₀(100)=20dB, 1000배면 10log₁₀(1000)=30dB로, 세기는 기하급수로 뛰어도 데시벨 숫자는 산술급수로 얌전히 늘어납니다. 사람 귀가 들을 수 있는 소리 세기 범위가 수조 배에 달할 만큼 넓기 때문에, 로그를 쓰지 않으면 표기 자체가 비현실적으로 커집니다.

지진 규모(리히터 규모)도 같은 원리로, 규모가 1 커질 때마다 지반의 진폭이 약 10배 커집니다. 규모 5와 규모 6은 숫자로는 1밖에 차이 나지 않지만 실제 흔들림은 10배 차이입니다. 수소이온농도(pH) 역시 pH = −log₁₀([H⁺])로 정의되어, pH가 4에서 7로 3 늘어나면 수소이온 농도는 10³=1000배 옅어집니다(계산: −log₁₀(0.0001)=4). 이렇게 '1 차이 = 10배 차이'라는 로그 스케일의 성질을 모르면, 데시벨이나 규모 숫자의 작은 차이를 실제보다 훨씬 작게 느끼기 쉽습니다.

log₂ · log₁₀ · ln, 어떤 밑을 언제 골라야 할까

세 밑은 쓰임새가 다릅니다. log₁₀(상용로그)은 자릿수·데시벨·pH처럼 '10배씩' 커지는 값을 다룰 때 직관적입니다. log₂(이진로그)는 컴퓨터 자료구조에서 값을 반씩 나누며 찾는 이진 탐색 횟수처럼, 절반씩 줄어드는 과정을 셀 때 쓰입니다(예: log₂(1024)=10 → 1024개 중 하나를 찾는 데 최대 10번 비교). ln(자연로그, 밑 e)은 복리 이자·인구 증가·방사성 붕괴처럼 순간 변화율이 현재 값에 비례하는 연속 성장 모델에서 미적분과 가장 잘 맞물립니다. 이 계산기는 세 프리셋을 모두 버튼 하나로 전환할 수 있어, 상황에 맞는 밑을 바로 비교해 볼 수 있습니다.

What is the Logarithm Calculator?

A logarithm answers how many times a base must be multiplied by itself to reach a given value (x). That is, log_b(x) = y means b^y = x. This tool supports common log (base 10), natural log (ln, base e), binary log (base 2), and any custom base.

How to use it

Enter a positive value for x, choose a base preset (10, e, 2) or type a custom base, then press Calculate. x must be greater than 0, and the base must be greater than 0 and not equal to 1.

Formula & reference

Change-of-base formula: log_b(x) = ln(x) / ln(b). Base 10 is the common log, base e (≈2.71828) is the natural log (ln), and base 2 is the binary log.

Sample values
ExpressionResult
log₁₀(100)2
ln(e)1
log₂(8)3
Why decibels, earthquake magnitude, and pH use a log scale

A decibel (dB) is defined as 10log₁₀(intensity ratio), so a 10x jump in sound intensity raises the level by exactly 10dB. A 100x jump gives 10log₁₀(100)=20dB, and a 1000x jump gives 10log₁₀(1000)=30dB — intensity grows exponentially while the decibel number grows in tidy, linear steps. Since audible sound intensity spans a range of trillions, dropping the log would make the raw numbers unmanageably large.

Earthquake magnitude works the same way: each whole step up in magnitude corresponds to roughly a 10x increase in ground amplitude. Magnitude 5 and magnitude 6 differ by only 1 on paper, but the actual shaking differs by a factor of 10. pH follows the identical pattern, defined as pH = −log₁₀([H⁺]); going from pH 4 to pH 7 (a difference of 3) means the hydrogen-ion concentration drops by 10³=1000x (check: −log₁₀(0.0001)=4). Without recognizing that "1 unit difference = 10x difference" on a log scale, it's easy to underestimate what a small change in decibels or magnitude actually means.

Choosing between log₂, log₁₀, and ln

Each base suits a different purpose. log₁₀ (common log) is intuitive for values that grow "by powers of 10," like digit counts, decibels, or pH. log₂ (binary log) fits processes that repeatedly halve, such as counting binary-search comparisons in a data structure (e.g. log₂(1024)=10 means finding one item among 1024 takes at most 10 comparisons). ln (natural log, base e) pairs most naturally with calculus for continuous-growth models — compound interest, population growth, radioactive decay — where the instantaneous rate of change is proportional to the current value. This calculator lets you switch between all three presets with one button, so you can compare them directly for your situation.

밑 변환 공식은 어떻게 되나요?
이 계산기는 밑 변환 공식 log_b(x) = ln(x) / ln(b)를 사용합니다. 자바스크립트의 Math.log()는 자연로그(밑 e)만 제공하므로, 원하는 밑 b로 나누어 원하는 밑의 로그값을 구합니다.
왜 진수 x는 0보다 커야 하나요?
로그의 진수(x)가 0이거나 음수이면 실수 범위에서 값이 정의되지 않습니다. 로그 함수는 양수 입력에 대해서만 실수 결과를 가지므로, x는 반드시 0보다 커야 합니다.
밑(b)이 1이면 왜 계산할 수 없나요?
밑이 1이면 1을 아무리 거듭제곱해도 항상 1이 되어 log_1(x)가 정의되지 않습니다(x=1일 때도 무한히 많은 답이 존재). 그래서 밑은 0보다 크고 1이 아니어야 합니다.
데시벨·지진 규모·pH는 왜 로그 스케일을 쓰나요?
소리 세기가 10배 커질 때마다 데시벨은 10씩만 오르도록(log10(10)=1 → 10dB) 설계되어 있어, 사람 귀가 감지하는 넓은 세기 범위를 다루기 쉬운 작은 숫자로 압축합니다. 지진 규모와 수소이온농도(pH)도 같은 원리로, 규모나 pH가 1 차이 날 때마다 실제 물리량은 10배씩 차이 납니다.
log2·log10·ln 중 어떤 밑을 언제 써야 하나요?
log10(상용로그)은 자릿수·데시벨·pH처럼 10배 단위 크기를 다룰 때, log2(이진로그)는 자료구조 탐색 횟수처럼 반씩 나누는 컴퓨터 연산을 다룰 때, ln(자연로그)은 연속 성장·이자·방사성 붕괴처럼 순간 변화율이 중요한 수식을 다룰 때 주로 사용합니다.
What is the change-of-base formula?
This tool uses the change-of-base formula log_b(x) = ln(x) / ln(b). Since JavaScript's Math.log() only provides the natural log (base e), dividing by ln(b) yields the logarithm for any desired base.
Why must x be greater than 0?
If x is zero or negative, the logarithm is not defined over the reals. Logarithm functions only produce real results for positive inputs, so x must be strictly greater than 0.
Why can't the base be 1?
If the base is 1, raising 1 to any power always gives 1, so log_1(x) is undefined (and has infinitely many solutions when x=1). The base must be greater than 0 and not equal to 1.
Why do decibels, earthquake magnitude, and pH use a log scale?
Decibels are defined so a 10x jump in sound intensity raises the level by exactly 10 (log10(10)=1 → 10dB), compressing the huge range the human ear can detect into manageable numbers. Earthquake magnitude and pH follow the same logic — each 1-unit difference corresponds to a 10x difference in the underlying physical quantity.
When should I use log2, log10, or ln?
Use log10 (common log) for values that scale in powers of 10, like digit counts, decibels, or pH. Use log2 (binary log) for computing processes that repeatedly halve, like search comparisons in a data structure. Use ln (natural log) for continuous-growth formulas — compound interest, radioactive decay — where the instantaneous rate of change matters.