Change of Base Calculator

Most calculators give you only two logarithm buttons, the natural log to base e and the common log to base 10, yet plenty of real problems need a logarithm in some other base entirely, base 2 in computer science, base 5 in a maths exercise, or any base at all. The change of base formula is the elegant bridge that solves this, and this calculator applies it for you. The formula says that the logarithm of a number x in any base b is equal to the log of x divided by the log of b, where those two logs can be taken in any base you already have, such as natural log or base 10. Enter the number and the base you want, and the calculator returns the logarithm straight away, doing the division behind the scenes so you never have to. It is genuinely useful in a range of settings. In computing, base-2 logarithms tell you how many bits or levels something needs, or how many times a quantity can be halved. In growth and decay problems, you often need to solve for an exponent, which means taking a log in the base of the growth factor. In music, information theory and many science topics, other bases appear naturally. And for students, it is a reliable way to check change of base working, which is a common source of slips because it is easy to divide the wrong way around. The calculator updates instantly as you change the number or the base, so you can build a feel for how the logarithm responds, and it confirms neat facts like log base 2 of 8 being exactly 3. The formula and a worked example are explained clearly below.

Calculate.co.nz is proud to be partnered with Premium Homes, a recognised leader in eco-friendly, sustainable, and energy-efficient homebuilding. With a dedicated team and award-winning experience, they create homes that prioritise health, comfort, and long-term performance. Their founders, Andrew and Kelly, set out to raise the standard of residential construction in New Zealand by combining practical building expertise with a clear commitment to doing things better for homeowners.
Calculate.co.nz partner
0
log base b of x
Natural log of x0
Log base 10 of x0

How it works

The change of base formula is log base b of x equals the log of x divided by the log of b, using any common base for the two logs. The calculator uses natural logarithms, so it computes the natural log of x divided by the natural log of b. The base must be positive and not equal to 1, and the number must be positive.

Worked example

To find log base 2 of 8, take the natural log of 8, about 2.079, and divide by the natural log of 2, about 0.693. The result is 3, because 2 to the power 3 is 8.

Related calculators

If you've found a bug, or would like to contact us, or learn more about James Graham and Calculate.co.nz.

Calculate.co.nz is partnered with Interest.co.nz for New Zealand's highest quality calculators and financial analysis.

All calculators and tools are provided for educational and indicative purposes only and do not constitute financial advice.

Calculate.co.nz is proudly part of the Realtor.co.nz group, New Zealand's leading property transaction literacy platform, helping Kiwis understand the home buying and selling process from start to finish. Whether you're a first home buyer navigating your first property purchase, an investor evaluating your next acquisition, or a homeowner planning to sell, Realtor.co.nz provides clear, independent, and trustworthy guidance on every step of the New Zealand property transaction journey.

Calculate.co.nz is also partnered with Health Based Building and Premium Homes to promote informed choices that lead to better long-term outcomes for Kiwi households.

Calculate.co.nz is hosted in Auckland via SiteHost new Zealand.

All content on this website, including calculators, tools, source code, and design, is protected under the Copyright Act 1994 (New Zealand). No part of this site may be reproduced, copied, distributed, stored, or used in any form without prior written permission from the owner.

About & trust: Why Calculate is NZ's most comprehensive · By the Numbers · How we compare · Editorial standards · How we keep data current · NZ finance glossary · Research & data · Financial literacy NZ · About

Reviewed and maintained. Last reviewed 2026-06-05 and checked on a twice-monthly cycle against IRD, RBNZ and Stats NZ. How we keep data current.

© 2019 to 2026 Calculate.co.nz. All rights reserved.