ForHosting KIT · Math

Aliquot sum calculator

The proper divisors of 12 add up to 16, which is more than 12, so 12 is abundant; 6 gives exactly 6 and is perfect. Enter a whole number to get its aliquot sum, its class and the prime factors behind it. 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
N
12
You get
Aliquot sum
16
Classification
abundant

The aliquot sum of a positive integer n is the sum of its proper divisors—every positive divisor except n itself. Six is perfect because 1 + 2 + 3 equals 6; twelve is abundant because 1 + 2 + 3 + 4 + 6 equals 16; nine is deficient because 1 + 3 equals 4. This capability factors n, derives the aliquot sum as sigma(n) minus n, and labels the number perfect, deficient, or abundant in one deterministic response.

What the aliquot sum is and how classification works

Proper divisors of n are the positive integers that divide n exactly and are strictly smaller than n. Their sum is the aliquot sum s(n). Equivalently, if sigma(n) denotes the sum of all positive divisors including n, then s(n) equals sigma(n) minus n.

For n equal to one the set of proper divisors is empty, so s(1) is zero. Classification follows the classical trichotomy used since Nicomachus: when s(n) equals n the integer is perfect; when s(n) is less than n it is deficient; when s(n) exceeds n it is abundant. Six is the smallest perfect number; twenty-eight is the next familiar example.

Twelve and eighteen are abundant; primes and prime powers p to a small exponent are typically deficient because their only proper divisors are one and lower powers of p. This calculator never approximates or samples candidates: it factors n once with trial division, multiplies the geometric series for each prime power to obtain sigma(n), subtracts n, and returns the integer aliquot sum together with the classification label and the prime factors used so you can audit every step.

Perfect, deficient, and abundant numbers in practice

Perfect numbers are rare among small integers: after six and twenty-eight come four hundred ninety-six and eight thousand one hundred twenty-eight, all even and linked to Mersenne primes in Euclid–Euler form. Abundant numbers such as twelve, eighteen, twenty, and twenty-four appear far more often and seed aliquot sequences that may cycle, grow, or eventually reach a prime. Deficient numbers dominate the integers; every prime is deficient with aliquot sum one.

Keep n within the published limit so trial division stays interactive; for cryptographic-size integers you need a dedicated multiprecision factoring stack, not this lightweight parse capability. Sibling search traffic for the full divisor sum sigma(n) is served by a separate sum-of-divisors landing—this page targets people who specifically want proper divisors and the perfect versus deficient versus abundant label.

Scaffold aliquot-sequence research scripts

Call this capability as the s(n) step when exploring aliquot chains, amicable pairs, or sociable cycles without reimplementing factorization.

Contest and CTF number-theory checks

Verify abundance class and proper-divisor totals quickly while solving programming contest or capture-the-flag problems that mention perfect or abundant numbers.

What is the aliquot sum of n?

It is s(n), the sum of all positive divisors of n except n itself. For 12 the proper divisors are 1, 2, 3, 4, and 6, so the aliquot sum is 16.

How are perfect, deficient, and abundant defined?

Compare s(n) with n: equal means perfect, less means deficient, greater means abundant. Six is perfect (1+2+3=6); nine is deficient (1+3=4); twelve is abundant (16>12).

How does this differ from the sum of all divisors?

Sigma(n) includes n; the aliquot sum excludes it. Equivalently s(n) = sigma(n) − n. This tool returns s(n) and the classification, not sigma alone.

Is the aliquot sum calculator free?

The browser tool is free and runs locally.

What is the aliquot sum of a prime number?

It is always 1, because the only proper divisor of a prime is 1. That makes every prime deficient, since its aliquot sum is smaller than the number itself.

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/numth/aliquot-sum

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/numth/aliquot-sum \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"n":12}'
{
  "n": 12
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "numth.aliquot_sum",
  "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_n1000000000000
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.

Run it free in your browser or call the API when you need the same arithmetic from scripts, homework checkers, and recreational number-theory pipelines without installing a computer-algebra system.

How to call the API and what comes back

Use it from homework pipelines, CTF write-ups, aliquot-sequence research scaffolds, or any workflow that needs a reproducible proper-divisor sum and abundance class without installing specialized computer-algebra software on every machine. Send a JSON body with a single required field n—a positive whole number at least one and at most one trillion (ten to the twelfth). Aliases number and value are accepted for the same field. On success the response includes n as accepted, aliquot_sum as the proper-divisor total, classification as one of the strings perfect, deficient, or abundant, and factors as an ordered list of objects each with prime and exponent. Failed validation—missing n, a non-integer, a value below one, or a value above the published limit—returns invalid_input and is never charged. Pricing is a flat $0.002 per successful request (unit item with zero marginal unit price).

Perfect, deficient, and abundant numbers in practice

Because this endpoint returns both the aliquot sum and the factorization, you can also recover sigma(n) as aliquot_sum plus n, or compute the divisor count offline as the product of each exponent plus one when you need it for teaching or debugging.

Homework: label perfect, deficient, and abundant numbers

Give students an integer and check their hand-computed proper-divisor sum and classification against a deterministic API or free browser result.

What inputs are rejected?

Missing n, non-integers, values below 1, and values above 10^12 return invalid_input. Those failures are not charged.

Read the full KIT documentation →