How the Log Calculator (Logarithm) works
A logarithm answers the question "what exponent do I raise the base to, in order to get this number?" Formally, log_b(x) = y is defined to mean b^y = x, for a base b > 0 (b ≠ 1) and a positive number x. This calculator computes log_b(x) for any base you enter, along with the three most commonly used logarithms — base 10, base e, and base 2 — so you can see them side by side.
The change-of-base formula
Calculators and programming languages typically only implement two logarithm functions directly: the natural log ln(x) (base e) and sometimes log10(x) (base 10). To get a logarithm in any other base b, this tool uses the change-of-base formula: log_b(x) = ln(x) / ln(b). This works because both the numerator and denominator scale by the same factor when you switch reference bases, so the ratio stays correct regardless of which log function you start from — log_b(x) = ln(x)/ln(b) = log10(x)/log10(b) always give the same answer.
Log rules and common mistakes
- Domain errors: the argument x must be strictly greater than 0 — log(0) and log(negative number) are undefined in the real numbers.
- Invalid base: the base b must be positive and cannot equal 1 (since 1 raised to any power is always 1, it can never equal x unless x is also 1, so the function isn't invertible).
- Confusing log rules with exponent rules: log(x) + log(y) = log(xy), NOT log(x)·log(y). Likewise log(x) − log(y) = log(x/y), and k·log(x) = log(x^k).
- Mixing up "log" conventions: in most math and calculator contexts "log" alone means base 10, but in computer science it sometimes means base 2, and in pure math or calculus it can mean the natural log — always confirm which base is intended.
Applications
Logarithms compress data that spans many orders of magnitude (earthquake magnitude on the Richter scale, sound intensity in decibels, pH in chemistry, and the loudness of the human ear all use log scales). In computer science, log2(n) measures the number of times a value can be halved, which is why algorithms like binary search run in O(log n) time. In finance, natural logs are used to model continuously compounded growth and to convert compound growth rates into additive log-returns for analysis.
Frequently Asked Questions
What is a logarithm?
How do you calculate a logarithm with any base on a calculator?
Why must the base be positive and not equal to 1?
What is the difference between log, ln, and log2?
Common Tip Percentages
| Service | Typical Tip Range | Notes |
|---|---|---|
| Restaurant (sit-down) | 15–20% | 20%+ for exceptional service |
| Food delivery | 10–20% | Consider extra for long distances |
| Taxi / rideshare | 10–20% | More for assistance with luggage |
| Hotel housekeeping | $2–5/night | Leave daily, not just at checkout |
| Barber / hair salon | 15–20% | On pre-discount total |
| Pizza delivery | 10–15% or $3–5 minimum | Higher in bad weather |
General Household Budget Ratios (50/30/20 Rule)
| Category | % of Net Income | Examples |
|---|---|---|
| Needs | 50% | Rent, groceries, utilities, insurance |
| Wants | 30% | Dining out, entertainment, hobbies |
| Savings / Debt | 20% | Emergency fund, retirement, extra payments |
Common Measurement Conversions for Everyday Use
| Quantity | US / Imperial | Metric Equivalent |
|---|---|---|
| 1 cup | 8 fl oz | 237 mL |
| 1 pint | 16 fl oz | 473 mL |
| 1 quart | 32 fl oz | 946 mL |
| 1 gallon | 128 fl oz | 3.785 L |
| 1 lb | 16 oz | 453.6 g |
| 1 ft | 12 in | 30.48 cm |