Skip to content
CornerTools

Log Calculator

Work out logarithms in any base, or solve log_b(x) = y for the number or the base, exactly where possible, with the steps.

Find

log_b(x) = y

Numbers, fractions such as 1/8, e, pi, sqrt( ) and powers with ^.

log₁₀(200) ≈

2.301029996

= 2 + log₁₀(2)

ln 200
≈ 5.298317367

Change of base: log₁₀(200) = ln 200 ÷ ln 10

Enter a base and a number to get the logarithm, exactly where it is a fraction and to ten significant figures where it is not. It opens on log₁₀ 200 = 2 + log₁₀(2), ≈ 2.301029996. Switch Find to the number for an antilog, or to the base when you know the number and its log.

The fields take more than decimals: fractions such as 1/8, e, π, roots written sqrt(2) and powers such as 2^10, so log_√2 8 and ln √e come out exact. Every answer has its steps, and the article ends with a four-figure common log table worked out by the same code.

How to use it

Find picks which of log_b(x) = y is worked out; the other two are typed in. Base (b) is 10 to begin with; type e for the natural log, 2 for the binary log, or any number above 0 other than 1. Number (x) is above 0, as logarithms are defined only there. Result (y) can be any number. A bare log in a field means log₁₀, as on a calculator's log key.

A number typed in full, such as 2.718 or 1e-300, is that exact number: 2.718 is not e, and log₁₀ of 1e-300 is exactly −300. When finding the log or the number, ln x and log₁₀ x are given under the answer, less the one the answer already is, and a log with no exact form also gets the change-of-base line that turns it into natural logs.

How the logarithm is worked out

Definition. log_b(x) = y means bʸ = x: the log is the power the base is raised to. The first step of every answer writes it in this exponential form.

When the answer is exact. The base and the number are each written as a product of powers, of whole numbers that share no factor and of e. The log is a fraction exactly when the two sets of powers are in proportion: 8 = 2³ and 2 = 2¹ give log₈ 2 = 1/3, and e and √e = e^(1/2) give ln √e = 1/2. The whole numbers come from greatest common divisors alone, so a 100-digit base is no slower than a small one.

Otherwise. For a whole-number base, the whole powers of the base come out first, as log₂ 12 = 2 + log₂ 3. What is left goes through the change of base: log_b x = ln x ÷ ln b. Each log is worked out from the number's digits, so it stays accurate past a calculator's range (10⁻³⁰⁰ and beyond) and for numbers close to 1.

The number and the base. x = bʸ and b = x^(1/y) are exact where the power is, in simplest radical form with no root left in a denominator: 10^2.5 = 100√10, and the base for x = 0.5 and y = 2 is √2/2. A whole number is written in full while the exponent is at most 1,000 and the number has at most 1,233 digits, and a fraction while its top and bottom each have at most 100 digits, as in the Exponent Calculator. Past these limits the decimal is worked out digit by digit, in scientific notation when it is large or small: 10^−500 = 1 × 10⁻⁵⁰⁰.

log_b(x) = y means bʸ = x
log_b(x) = ln x ÷ ln b
log_b(xy) = log_b x + log_b y
log_b(bᵏ) = k

Examples

log₈ 2

With Base 8 and Number 2, the log is 1/3, ≈ 0.3333333333.

  1. Write log₈(2) = y in exponential form: 8^y = 2
  2. Write 8 as a power of 2: 8 = 2³
  3. Write 2 as a power of 2 too: 2 = 2¹
  4. So the powers of each side match: 3y = 1
  5. So: y = 1/3

The antilog of 2.5

With Find on Number, Base 10 and Result 2.5, x is 100√10, ≈ 316.227766.

  1. Write log₁₀(x) = 2.5 in exponential form: x = 10^2.5
  2. Write 2.5 as a fraction: 2.5 = 5/2
  3. Work out the power: 10^(5/2) = 100√10
  4. As a decimal x ≈ 316.227766

The base when log_b 81 = 4

With Find on Base, Number 81 and Result 4, the base is 3.

  1. Write log_b(81) = 4 in exponential form: b⁴ = 81
  2. Raise both sides to the power 1/4, as the base is above 0: b = 81^(1/4) = 3

log₂ 12

With Base 2 and Number 12, no power of 2 gives 12, so the answer is 2 + log₂(3), ≈ 3.584962501.

  1. Write log₂(12) = y in exponential form: 2^y = 12
  2. Take out the powers of 2: 12 = 2²×3
  3. The log of a product is the sum of the logs, and log₂(2²) = 2: log₂(12) = 2 + log₂(3)
  4. No rational power of 2 gives 3, so change the base to e log₂(3) = ln 3 ÷ ln 2 ≈ 1.098612289 ÷ 0.6931471806 ≈ 1.584962501
  5. Add the 2 log₂(12) ≈ 3.584962501

Four-figure common log table

Common logarithms (base 10) of 1.00 to 9.99 to four figures, with mean differences for a fourth figure
N0123456789123456789
1000000043008601280170021202530294033403744812172125293337
1104140453049205310569060706450682071907554811151923263034
1207920828086408990934096910041038107211063710141721242831
1311391173120612391271130313351367139914303610131619232629
141461149215231553158416141644167317031732369121518212427
151761179018181847187519031931195919872014368111417202225
162041206820952122214821752201222722532279358111316182124
172304233023552380240524302455248025042529257101215172022
18255325772601262526482672269527182742276525791214161921
19278828102833285628782900292329452967298924791113161820
20301030323054307530963118313931603181320124681113151719
21322232433263328433043324334533653385340424681012141618
22342434443464348335023522354135603579359824681012141517
2336173636365536743692371137293747376637842467911131517
2438023820383838563874389239093927394539622457911121416
2539793997401440314048406540824099411641332357910121415
2641504166418342004216423242494265428142982357810111315
274314433043464362437843934409442544404456235689111314
284472448745024518453345484564457945944609235689111214
294624463946544669468346984713472847424757134679101213
304771478648004814482948434857487148864900134679101113
314914492849424955496949834997501150245038134678101112
32505150655079509251055119513251455159517213457891112
33518551985211522452375250526352765289530213456891012
34531553285340535353665378539154035416542813456891011
35544154535465547854905502551455275539555112456791011
36556355755587559956115623563556475658567012456781011
3756825694570557175729574057525763577557861235678910
3857985809582158325843585558665877588858991235678910
3959115922593359445955596659775988599960101234578910
4060216031604260536064607560856096610761171234568910
416128613861496160617061806191620162126222123456789
426232624362536263627462846294630463146325123456789
436335634563556365637563856395640564156425123456789
446435644464546464647464846493650365136522123456789
456532654265516561657165806590659966096618123456789
466628663766466656666566756684669367026712123456778
476721673067396749675867676776678567946803123455678
486812682168306839684868576866687568846893123445678
496902691169206928693769466955696469726981123445678
506990699870077016702470337042705070597067123345678
517076708470937101711071187126713571437152123345678
527160716871777185719372027210721872267235122345677
537243725172597267727572847292730073087316122345667
547324733273407348735673647372738073887396122345667
557404741274197427743574437451745974667474122345567
567482749074977505751375207528753675437551122345567
577559756675747582758975977604761276197627122345567
587634764276497657766476727679768676947701112344567
597709771677237731773877457752776077677774112344567
607782778977967803781078187825783278397846112344566
617853786078687875788278897896790379107917112344566
627924793179387945795279597966797379807987112334566
637993800080078014802180288035804180488055112334556
648062806980758082808980968102810981168122112334556
658129813681428149815681628169817681828189112334556
668195820282098215822282288235824182488254112334556
678261826782748280828782938299830683128319112334556
688325833183388344835183578363837083768382112334456
698388839584018407841484208426843284398445112234456
708451845784638470847684828488849485008506112234456
718513851985258531853785438549855585618567112234455
728573857985858591859786038609861586218627112234455
738633863986458651865786638669867586818686112234455
748692869887048710871687228727873387398745112233455
758751875687628768877487798785879187978802112233455
768808881488208825883188378842884888548859112233455
778865887188768882888788938899890489108915112233445
788921892789328938894389498954896089658971112233445
798976898289878993899890049009901590209025112233445
809031903690429047905390589063906990749079112233445
819085909090969101910691129117912291289133112233445
829138914391499154915991659170917591809186112233445
839191919692019206921292179222922792329238112233445
849243924892539258926392699274927992849289112233445
859294929993049309931593209325933093359340112233445
869345935093559360936593709375938093859390112233445
879395940094059410941594209425943094359440011223344
889445945094559460946594699474947994849489011223344
899494949995049509951395189523952895339538011223344
909542954795529557956295669571957695819586011223344
919590959596009605960996149619962496289633011223344
929638964396479652965796619666967196759680011223344
939685968996949699970397089713971797229727011223344
949731973697419745975097549759976397689773011223344
959777978297869791979598009805980998149818011223344
969823982798329836984198459850985498599863011223344
979868987298779881988698909894989999039908011223344
989912991799219926993099349939994399489952011223344
999956996199659969997499789983998799919996011223334

Frequently asked questions

For log 2.345, find row 23 and column 4 (3692), then add the mean difference under 5 in that row (9): 3701, so log 2.345 ≈ 0.3701. The table gives the decimal part, the mantissa; for 234.5 add the whole part 2, as 234.5 = 2.345 × 10². The mean differences here are worked out per row, so a printed table, which often averages over half rows or rounds its entries differently, may differ by 1 in the last figure.
ln is the natural log, to base e ≈ 2.718. On a calculator and in school mathematics, log usually means base 10; in much of higher mathematics, log means ln. This tool reads a bare log as base 10 and says ln for base e.
The number a log comes from: the antilog of y in base b is bʸ. Set Find to Number (x) to work one out.
Not as a real number. A positive base to any power is above 0, so no real y gives bʸ = −5 or 0, and the tool says logarithms are defined only for numbers above 0. The base must also be above 0 and not 1, since 1 to any power is 1.

See also