Exponent power calculator
Raise a number to any whole exponent and see the working: 2 to the 5th is 2 × 2 × 2 × 2 × 2, which is 32, and a negative exponent comes out as a fraction. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Base
- 2
- Exponent
- 5
- Result
- 32
- Expression
- 2^5
- Expansion
- 2 × 2 × 2 × 2 × 2
- Exponent kind
- positive
Raising a number to an integer power is one of the first operations every algebra student must master after multiplication itself. Teachers, tutors, homework platforms, and exam generators need a single reliable answer for positive exponents written as repeated factors, for the zero-exponent rule that yields one, and for negative exponents written as unit fractions over a positive power. This exponent power calculator accepts a finite base and an integer exponent, evaluates the power with a deterministic school-algebra contract, and returns the expression, a repeated-multiplication expansion students can compare to their work, and the numeric result.
What base^n means for positive, zero, and negative integer exponents
In school algebra the notation a to the power n means a specific family of constructions that depend on the sign of the integer exponent. When n is a positive integer, a^n is the product of n factors of a: two to the fifth is two multiplied by itself five times and equals thirty-two.
When n is zero and the base is not zero, the empty product convention and every standard textbook agree that a^0 equals one; that single rule is the backbone of polynomial degree arguments and of simplifying ratios of powers with the same base. When n is a negative integer, say n equals negative k with k positive, a^n is defined as the reciprocal of a^k, provided a is not zero: two to the power of negative three equals one over two cubed, which is one eighth.
Zero raised to a positive integer is zero. Zero raised to a negative integer is undefined because it would require division by zero. Negative bases with integer exponents are fully supported: the sign of the result follows whether the absolute value of the exponent is odd or even, exactly as students learn when they evaluate negative three squared versus negative three cubed.
The expansion field restates the repeated product or the reciprocal of that product so a learner can audit each factor rather than only the final number.
What you can do with it
Classroom and homework checks
Let students submit base and integer exponent and verify expression, repeated-multiplication expansion, and result against textbook rules for positive, zero, and negative powers.
FAQ
How do I compute base raised to an integer exponent?
Send a finite base and an integer exponent.
What is any non-zero number to the power of zero?
By the school algebra contract, a^0 equals 1 when a is not zero. The expansion field is the string "1". Zero to the zero is rejected as undefined.
How are negative exponents handled?
For exponent −n with n positive and base non-zero, the result is 1 / base^n.
Why are 0^0 and 0^negative rejected?
They are undefined in this school contract: 0^0 has no single agreed value, and a negative exponent on zero would divide by zero.
How does a negative base change the sign of the result?
It depends on whether the exponent is odd or even. Negative three squared comes out positive, while negative three cubed stays negative, exactly as students learn when they compare the two by hand.
Related tools
For developers — API access
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.
API endpoint
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.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/edu/exponent-power \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"base":2,"exponent":5}'const res = await fetch("https://api.kit.forhosting.com/edu/exponent-power", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"base": 2,
"exponent": 5
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/edu/exponent-power",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"base": 2,
"exponent": 5
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/edu/exponent-power", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"base":2,"exponent":5}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"base":2,"exponent":5}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/edu/exponent-power", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"base": 2,
"exponent": 5
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "edu.exponent_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.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |
Technical notes
Undefined cases such as zero to the zero and zero to a negative exponent fail with invalid_input instead of inventing a convention.
What base^n means for positive, zero, and negative integer exponents
Zero raised to zero is left undefined in this contract because curricula disagree and because an API that picks a side without telling the client creates silent grading bugs. Together, expression, expansion, exponent_kind, and result form a complete checkable record for worksheets, step-review UIs, and LMS auto-graders that want more than a bare scalar.
Input contract, response shape, and error behaviour
Bases whose magnitude exceeds one quadrillion are rejected to keep intermediate products meaningful for school use. A short formula string restates the school identities used. Example: base two and exponent five yields expression 2^5, expansion 2 × 2 × 2 × 2 × 2, and result thirty-two. Example: base five and exponent zero yields result one and expansion one. POST a JSON body with two required fields: base, a finite real number (aliases a, b, bottom), and exponent, a finite integer whose absolute value is at most sixty-four so repeated multiplication stays exact and fast (aliases n, exp, power, e). Each field may arrive as a JSON number or as a numeric string; missing keys, empty strings, non-finite values, and non-integer exponents fail with invalid_input naming the problem. On success the body echoes base and exponent, builds an expression string such as 2^5 or (-3)^4, supplies expansion as the repeated multiplication or as one over that product for negative exponents, labels exponent_kind as positive, zero, or negative, and returns result as a stable number rounded to twelve decimal places when it is not an integer. For negative exponents the optional field result_reciprocal_of reports the intermediate positive-power magnitude before taking the reciprocal, which helps step-by-step UIs show both a^k and 1/a^k. Example: base two and exponent negative three yields expansion 1 / (2 × 2 × 2), result 0.125, and result_reciprocal_of eight. Requests that ask for 0^0 or for zero to a negative power fail with a clear invalid_input message and are not billed. Only successful evaluations consume the published $0.002 base price per item.
Where an exponent power calculator earns its keep
Classrooms and tutoring platforms embed an exponent power calculator so students can verify homework on positive, zero, and negative integer exponents without flipping sign errors or inventing 0^0 by hand. Exam-prep generators and LMS plugins need a deterministic oracle that marks undefined zero cases as wrong input rather than silently returning one or infinity. Worksheet and answer-key pipelines can batch thousands of base-and-exponent pairs for print keys, spaced-repetition decks, and computer-scored items without standing up a computer-algebra system. Engineering and science notebooks occasionally need a tiny integer-power helper for scaling factors, bit counts, or geometric sequences; calling a parse API avoids pulling symbolic libraries for a two-field problem.
Integration use cases
Exam and LMS auto-grading
Mark exponent items with a deterministic oracle that rejects 0^0 and 0^negative as invalid_input instead of inventing a convention or returning infinity.
Worksheet and answer-key generation
Batch-evaluate base^n pairs for print keys, spaced-repetition decks, and curriculum sites that need a live free exponent power calculator widget.
Technical questions
What does the exponent 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.