ForHosting KIT · Math

Power calculator

Raise a base to an exponent and get one finite number: 2 to the 10th is 1024 and 9 to the power one-half is 3. Cases that school algebra leaves undefined are refused instead of showing infinity. Free in your browser.

  • Free
  • Runs in your browser
  • No sign-up
  • Your data stays on your device
Use it from WebAPIEmailTelegramApp soon
If you enter
Base
2
Exponent
10
You get
Power
1,024
Expression
2^10

Raising a number to a power is the elementary operation that turns a base and an exponent into a single value: two to the tenth is one thousand twenty-four, nine to the one-half is three, and five to the zero is one. Students, teachers, graders, and automation scripts need a contract that always returns the same finite result for the same pair, and that refuses the cases school algebra treats as undefined instead of silently emitting Infinity or NaN. This power calculator accepts a finite base and a finite exponent, evaluates base to the power of the exponent, and returns the numeric power together with a short display expression you can show next to the answer. Zero raised to a negative exponent is rejected as undefined. A negative base with a non-integer exponent is rejected because no real number satisfies that request.

What base to the power of an exponent means in the reals

The power of a real number is repeated multiplication when the exponent is a whole number, and a root or a logarithmically interpolated stretch when the exponent is not an integer. Two to the fifth means two multiplied by itself five times and equals thirty-two. Two to the negative three means one over two cubed and equals one eighth.

Nine to the one-half is the principal square root of nine and equals three. A negative base with an integer exponent is well defined and keeps the usual sign rule: an odd integer exponent preserves the minus sign, an even integer exponent cancels it, so minus two cubed is minus eight and minus two to the fourth is sixteen. A negative base with a fractional exponent generally leaves the real line and is therefore rejected rather than being turned into a complex value or a quiet NaN.

That split is the same one a careful algebra course uses when it says a to the n is defined for every integer n once a is not zero, while a to a real exponent needs a positive base. The calculator exists so that homework checks, lesson widgets, and production scripts share one deterministic reading of those rules instead of each language's Math.pow quirks being rediscovered at grading time.

Where a dedicated power calculator earns its keep

Classrooms and tutoring platforms use a dedicated raise-to-the-power tool so learners can check integer, negative, and simple fractional exponents without flipping a handheld calculator or trusting a spreadsheet cell that quietly writes Infinity. Exam generators and learning-management graders need a deterministic oracle that marks zero to a negative exponent as undefined instead of accepting a huge sentinel that a buggy student script might also emit. Failed validation does not consume balance.

Keep requests inside the published magnitude limits, pin the cleaned power in tests, and you get reproducible results for homework, LMS plugins, and edge workers without standing up symbolic math infrastructure of your own. The capability does not solve exponential equations for an unknown exponent, does not raise complex numbers, and does not reduce modulo m; those are different search intents served by other catalog entries.

Classroom and homework checks

Let students submit a base and an exponent and verify the numeric power, including negative integer exponents and simple roots such as nine to the one-half.

Exam and LMS auto-grading

Mark raise-to-the-power items with a deterministic oracle that rejects zero to a negative exponent as undefined and never returns Infinity as a success.

Scripts, growth models, and notebooks

Evaluate a^n inside compound-growth, geometric-sequence, and polynomial pipelines without importing a computer-algebra library for two finite numbers.

How do I compute a base raised to an exponent?

Send finite numbers base and exponent. Integer exponents use successive squaring; non-integer exponents require a positive base.

What happens if I raise zero to a negative exponent?

Zero to a negative exponent is undefined in the reals (it would divide by zero) and is not billed.

Can I raise a negative base to a fractional exponent?

Integer exponents on a negative base are allowed and follow the usual odd/even sign rule.

What does the calculator return for 0^0?

Any other finite base to the power 0 also returns 1.

What does a negative exponent mean?

It means one divided by the base raised to the same exponent made positive. So 2 to the power of minus 3 is one over 2 cubed, which is one eighth.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/math/math-power

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.

curl -X POST https://api.kit.forhosting.com/math/math-power \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"base":2,"exponent":10}'
{
  "base": 2,
  "exponent": 10
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "math.math_power",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

max_abs_base1000000000000000
max_abs_exponent1000000
HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

Overflow that would leave IEEE floating-point is also rejected so callers never receive a non-finite success payload.

What base to the power of an exponent means in the reals

Any finite non-zero base to the power zero equals one, and this calculator also returns one for zero to the power zero, matching the IEEE-754 and JavaScript convention that keeps empty products consistent in code. Zero to a strictly negative exponent is not a real number: it would require dividing by zero, so the task fails with invalid_input instead of returning Infinity.

Input contract, algorithm, response shape, and errors

Integer exponents are evaluated by successive squaring, the classic O(log |n|) product that multiplies the running result when the current bit of the exponent is set and squares the running base on every bit. Non-integer exponents require a strictly positive base and are evaluated with the host power primitive. On success the body echoes the cleaned base and exponent, returns power as the finite numeric value, includes an expression string such as two caret ten for display, and restates the identity formula power equals base to the exponent. Example: base two and exponent ten yields power one thousand twenty-four and the expression two caret ten. Example: base two and exponent negative three yields power zero point one two five. POST a JSON body with two required finite numbers: base, the real number being raised, and exponent, the power applied to it. Each field may arrive as a JSON number or as a numeric string; the aliases a for base and exp or n for exponent are accepted and resolved in that order. Missing fields, empty strings, and non-finite values fail with invalid_input naming the field. Absolute value of the base may not exceed one quadrillion, and absolute value of the exponent may not exceed one million; those limits keep intermediate squares inside a Worker isolate. Zero with a negative exponent, a negative base with a non-integer exponent, and a result that overflows to Infinity or collapses to NaN are all invalid_input and are not billed. Pair the response with your own typesetting if you need a rendered superscript; this endpoint computes the number only and does not emit plots or step-by-step prose beyond the formula field.

Where a dedicated power calculator earns its keep

Engineering notebooks, finance spreadsheets, and growth models call a to the n constantly—compound factors, geometric sequences, polynomial terms, and unit conversions all reduce to one power—and a tiny parse API avoids pulling a computer-algebra system for two numbers.

What does the power calculator cost?

The browser tool is free. API requests use prepaid KIT balance at $0.002 per successful call; invalid input is not billed.

Read the full KIT documentation →