Logarithm – GeeksforGeeks


Logarithmic scales reduce wide-ranging quantities to smaller scopes. For example, the decibel (dB) is a unit used to express ratio as logarithms, mostly for signal power and amplitude (of which sound pressure is a common example). In chemistry, pH is a logarithmic measure for the acidity of an aqueous solution. Logarithms are commonplace in scientific formulae, and in measurements of the complexity of algorithms and of geometric objects called fractals. They help to describe frequency ratios of musical intervals, appear in formulas counting prime numbers or approximating factorials, inform some models in psychophysics, and can aid in forensic accounting. 12

The base b logarithm of a number is the exponent that we need to raise the base in order to get the number. When b is raised to the power of y is equal x:

b y = x

Then the base b logarithm of x is equal to y:

logb(x) = y

The logarithmic scale4 can describe very big or very small numbers with shorter notation.3

A logarithmic scale from 0.1 to 100 – Wikipedia


When I was in school (17+ years), logarithms were taught but not to the degree needed for use in real life. In some of the many positions I have held over the years, logarithms and logarithmic graphing were essential to the tasks I worked on. Use this page as a springboard in your understanding of logarithms and primarily log10.


This page introduces you to logarithms and uses decibels and the Richter Scale to show you how they are used. Also, the section on Graphing Logarithmic Functions presents a starting point in understanding logarithmic graphs.

Logarithmic Expressions


Logarithms very useful in the field of science, technology, and mathematics. Here are a few examples of real-life applications of logarithms.10

  • Electronic calculators have logarithms to make our calculations much easier.
  • Logarithms are used in surveys and celestial navigation.
  • Logarithms can be used to calculate the level of noise in decibels.
  • Ratio active decay, acidity [PH] of a substance and Richter scale are all measured in logarithmic form.

See Theoretical Knowledge Vs Practical Application.


Sound is all around us and can be measured to inform and protect us, as some sounds are not safe. In fact, loud noise can be very damaging to hearing. The level of noise, where a person is in relation to the noise (distance to the noise), and the amount of time they listen to it can all result in risk for hearing loss. Sound is measured in units called decibels (dB). The higher the decibel level, the louder the noise.1

Decibel is a logarithmic unit that indicates ratio or gain and is used to indicate the level of acoustic waves and electronic signals. The dB level can be viewed as relative gain of one level vs. other level, or absolute logarithmic scale level for well known reference levels. Decibel is a dimensionless unit. The ratio in bels is the base 10 logarithm of the ratio of P1 and P0: 2

RatioB = log10 ( P1 / P0 )

Decibel is one tenth of a bel, so 1 bel is equal to 10 decibel: 1B = 10dB


  • B – bels
  • RatioB is the sound intensity decibels
  • P1 is the sound intensity (W/m^2)
  • P0 is the reference sound intensity (equal to 10-12 W/m^2 for ambient noise)

Richter Scale

The Richter scale, officially called the “Richter Magnitude Scale,” is a numerical value used to measure the power of earthquakes. It is a logarithmic scale based on the amplitude of waves recorded by a seismograph. This means that each whole number increase on the scale corresponds to an absolute increase by a factor of ten. Earthquakes measured at less than about 2.0 on the Richter scale are not very serious, and can barely even be measured, much less felt. An earthquake is usually considered much more serious, and is felt by most people, once it hits about 5.0.

It is theoretically possible to have an earthquake of 10.0 or stronger, although this has never been recorded. Such a quake would be classified as Massive, and cause devastation across a very wide area.6

Representation of Richter scale earthquake magnitudes and energy equivalents. Source: Bravo and Ortiz (2005); Andrea et al. (2011) – ResearchGate

The Richter magnitude of an earthquake is determined from the logarithm of the amplitude of waves recorded by seismographs. Adjustments are included for the variation in the distance between the various seismographs and the epicenter of the earthquakes. Moment Magnitude (MW) is based on physical properties of the earthquake derived from an analysis of all the waveforms recorded from the shaking.7

Logarithmic View of the Universe

From the scale of planet Earth, at a few thousands of kilometers, to the scale of the observable Universe, at nearly 100 billion light-years, there’s a long way from here to the cosmic horizon. But rather than a linear scale, which would take several quintillions of Earths lined end-to-end to reach the limits of the observable Universe, a logarithmic scale holds far more cosmic insights to an onlooker. 11

In the Solar System, we typically measure distances in Astronomical Units (AU), where the Earth-Sun distance is 1 AU. Mercury and Mars are also about ~1 AU from Earth, with Saturn at ~10 AU, the Kuiper belt ending before ~100 AU, and the Oort cloud largely existing at ~10,000 AU. It’s an enormous distance on a linear scale, but only a small set of “factors of 10” away on a logarithmic one. – BIG THINK

Graphing Logarithmic Functions

Most people are familiar with reading numbers on a number line or reading data from a graph. However, under certain circumstances, a standard scale may not be useful. If the data grows or decreases exponentially, then you will need to use what is called a logarithmic scale. For example, a graph of the number of McDonald’s hamburgers sold over time would start at 1 million in 1955; then 5 million just a year later; then 400 million, 1 billion (in less than 10 years), and up to 80 billion by 1990. This data would be too much for a standard graph, but it is easily displayed on a logarithmic scale. You need to understand that a logarithmic scale has a different system of displaying the numbers, which are not evenly spaced as on a standard scale. By knowing how to read a logarithmic scale you can more effectively read and represent data in graphic form.8

Why are they common in science?

Plotting on a log-log scale has many advantages for environmental science.

  1. You are often dealing with very big or very small numbers, and particularly you are often dealing with numbers that range over many orders of magnitude.

    For instance, if you are measuring concentrations of some pollutant, and your data are something like 0.01 ppb, 0.2 ppb, 2ppb, 117 ppb, if you plot it on a linear scale, then the three smaller data points will all be “squished” in at almost the origin while the one big point sticks way out. You won’t be able to see your data at all. This is also why, for example, we use pH or the Richter scale, both of which use logarithms to compress the range of possible numbers.
  2. Power laws are very common.

    If you plot any power law (y = a * x^b) on a log-log scale, you get a straight line whose slope is b. So it’s always good to plot power law relationships on log-log axes, so you can see how closely they fit to a straight line.

On standard axes, power law and exponential relations often look very similar. On log-log axes, the power law looks very much like a straight line while the exponential relation does not (to make the exponential linear, you’ll have to take the log of only the y axis).9


Many of the References and Additional Reading websites and Videos will assist you with logarithms.

As some professors say: “It is intuitively obvious to even the most casual observer.


1 “What Are Decibels (Db)? | Loudness Levels, Safe, Unsafe”. 2021. earq.com. https://www.earq.com/hearing-health/decibels.

2 ⭐ “What Is A Decibel (Db)?”. 2021. rapidtables.com. https://www.rapidtables.com/electric/decibel.html.

3 ⭐ “Log Rules | Logarithm Rules”. 2021. rapidtables.com. https://www.rapidtables.com/math/algebra/Logarithm.html.

4 “Logarithmic Scale – Wikipedia”. 2021. en.wikipedia.org. https://en.wikipedia.org/wiki/Logarithmic_scale.

5 “Decibel Calculator – Calculator Academy”. 2021. Calculator Academy. https://calculator.academy/decibel-calculator/.

6 “What Is The Richter Scale? (With Pictures)”. 2011. All Things Nature. https://www.allthingsnature.org/what-is-the-richter-scale.htm.

7 Shepherd, Marshall. 2021. “Hurricane And Earthquake Scales Often Confuse People – Why That’s Dangerous”. Forbes. https://www.forbes.com/sites/marshallshepherd/2019/07/06/hurricane-and-earthquake-scales-often-confuse-people-why-thats-dangerous/?sh=1b4754e339ff.

8 “How To Read A Logarithmic Scale: 10 Steps (With Pictures)”. 2021. Wikihow.Com. https://www.wikihow.com/Read-a-Logarithmic-Scale.

9 Peterson, Dave. 2021. “Logarithmic Graphing – The Math Doctors”. themathdoctors.org. https://www.themathdoctors.org/logarithmic-graphing/.

10 “Introduction to Logarithms – Explanation & Examples”. 2021. The Story of Mathematics. https://www.storyofmathematics.com/logarithm.

11 “This Logarithmic View Of The Universe Will Blow Your Mind”. 2022. Big Think. https://bigthink.com/starts-with-a-bang/logarithmic-view-universe/.

12 “Logarithm – Wikipedia”. 2022. en.wikipedia.org. https://en.wikipedia.org/wiki/Logarithm.

Additional Reading


“A Tutorial on the Decibel”. 2021. arrl.org. http://www.arrl.org/files/file/A%20Tutorial%20on%20the%20Decibel%20-%20Version%202_1%20-%20Formatted.pdf.

“Db: What Is A Decibel?”. 2021. animations.physics.unsw.edu.au. https://animations.physics.unsw.edu.au/jw/dB.htm.

“Decibel”. 2021. phys.hawaii.edu. https://www.phys.hawaii.edu/~anita/new/papers/militaryHandbook/decibel.pdf.

“Decibels Dba | Computer Fan Noise And Decibels”. 2021. silentpc.com. https://silentpc.com/articles/decibels.

“Decibel – Wikipedia”. 2021. en.wikipedia.org. https://en.wikipedia.org/wiki/Decibel.

⭐ “Decibel Db – Formula & Definition »Electronics Notes”. 2021. electronics-notes.com. https://www.electronics-notes.com/articles/basic_concepts/decibel/basics-tutorial-formula-equation.php.

“Decibel Formula “. 2021. softschools.com. https://softschools.com/formulas/physics/decibel_formula/320/.

“Physics Tutorials – Sound – Decibel Levels”. 2021. internet4classrooms.com. https://www.internet4classrooms.com/sound_decibel.htm.

“How To Make Noise Calculations With Decibels – Womack Machine Supply Company”. 2021. Womack Machine Supply Company. https://www.womackmachine.com/engineering-toolbox/data-sheets/how-to-make-noise-calculations-with-decibels/.

Graphing Logarithmic Functions

“13.2: Logarithmic Functions And Their Graphs”. 2020. Mathematics LibreTexts. https://math.libretexts.org/Bookshelves/Precalculus/Precalculus_(Tradler_and_Carley)/13%3A_Exponential_and_Logarithmic_Functions/13.02%3A_Logarithmic_functions_and_their_graphs.

“Graphing Logarithmic Functions”. 2021. varsitytutors.com. https://www.varsitytutors.com/hotmath/hotmath_help/topics/graphing-logarithmic-functions.

“Graphing With Logarithmic Paper Tutorial | Physics”. 2021. physics.uoguelph.ca. https://www.physics.uoguelph.ca/graphing-logarithmic-paper-tutorial.

“Graphs of logarithmic functions (Algebra 2 level)”. 2021. Khan Academy. https://www.khanacademy.org/math/algebra-home/alg-exp-and-log#alg-graphs-of-logarithmic-functions.

“Graphs Of Logarithmic Function – Explanation & Examples”. 2021. storyofmathematics.com. https://www.storyofmathematics.com/graphs-of-logarithmic-functions.


” Algebra – Logarithm Functions “. 2021. tutorial.math.lamar.edu. https://tutorial.math.lamar.edu/Classes/Alg/LogFunctions.aspx.

“Exponentials and Logarithms Cheat Sheet”. 2021. pmt.physicsandmathstutor.com. https://pmt.physicsandmathstutor.com/download/Maths/A-level/Pure/Exponentials-and-Logarithms-1/Cheat-Sheets/Exponentials%20and%20Logarithms.pdf.

“Introduction To Logarithms”. 2021. mathsisfun.com. https://www.mathsisfun.com/algebra/logarithms.html.

“Logarithm Cheat Sheet – DoubleRoot.In”. 2021. doubleroot.in. https://doubleroot.in/cheat-sheets/logarithm/.

“Logarithms | Algebra 2 | Math | Khan Academy”. 2021. Khan Academy. https://www.khanacademy.org/math/algebra2/x2ec2f6f830c9fb89:logs#x2ec2f6f830c9fb89:log-intro.

“Logarithms | Brilliant Math & Science Wiki”. 2021. brilliant.org. https://brilliant.org/wiki/logarithms/.

“Log Rules | Logarithm Rules”. 2021. rapidtables.com. https://www.rapidtables.com/math/algebra/Logarithm.html.

⭐ “Logarithms: The Long Forgotten Story Of Scientific Progress”. 2022. Medium. https://medium.com/math-simplified/logarithms-the-long-forgotten-story-of-scientific-progress-11a4412ccb4b.

“Log Table: Logarithm Table With Examples & Questions- Embibe”. 2021. Embibe Exams. https://www.embibe.com/exams/log-table/.

“Logarithm Rules – Chilimath”. 2021. Chilimath. https://www.chilimath.com/lessons/advanced-algebra/logarithm-rules/.




⭐ Budassi, Pablo Carlos. “A Logarithmic Map Of The Entire Observable Universe”. 2022. Visual Capitalist. https://www.visualcapitalist.com/cp/map-of-the-entire-known-universe/.


Powers of Ten™ 1977 YouTube
Logarithm Fundamentals | Ep. 6 Lockdown live math

⭐ I suggest that you read the entire reference. Other references can be read in their entirety but I leave that up to you.

Website Powered by WordPress.com.

Up ↑