ForHosting KIT · Math

Double factorial calculator

7!! is 7 × 5 × 3 × 1, which makes 105, and 6!! is 6 × 4 × 2, which makes 48: the double factorial multiplies only the numbers that share the parity of n. Every digit stays exact, even for very large results. 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
7
You get
Double factorial
105
Notation
7!!
Parity
odd
Terms
4

The double factorial n double-bang is the product of every positive integer up to n that has the same parity as n. Odd arguments multiply the descending odd sequence; even arguments multiply the descending even sequence. The standard conventions set zero double-factorial and minus-one double-factorial both equal to one, which keeps many series and combinatorial identities tidy. This calculator evaluates n!! exactly with BigInt arithmetic so large intermediate products never lose digits to floating-point rounding. Inputs below minus one are rejected with a clear validation error because the real double factorial is not defined on that domain.

What the double factorial is and why it appears so often

Ordinary factorial multiplies every positive integer down to one. Double factorial keeps only half of those factors: the ones that match the parity of the starting index. For an odd n the product is n times n minus two times n minus four, continuing until one.

For an even n the product ends at two instead of one. That single change produces sequences that show up in combinatorics, trigonometry series, and volume formulas in higher dimensions. Classic small values include one double-factorial equals one, two double-factorial equals two, three double-factorial equals three, four double-factorial equals eight, five double-factorial equals fifteen, six double-factorial equals forty-eight, and seven double-factorial equals one hundred five.

The conventions zero double-factorial equals one and minus-one double-factorial equals one are not arbitrary quirks; they make recurrence relations and generating-function coefficients continuous at the origin. Students meet n!! when counting perfect matchings of a complete graph, when expanding arcsine or hyperbolic series, and when relating double factorial to ordinary factorial through identities such as (2k-1)!!

equals (2k)! over two-to-the-k times k!. Understanding that the operator only multiplies same-parity terms is the first step to using it confidently in code and on paper without confusing it with multifactorial or subfactorial notation.

Practical use, limits, pricing, and delivery

Use the browser tool when you want an immediate exact n!! while studying series coefficients, checking a contest answer, or explaining same-parity products without installing a computer-algebra system. Accepted indexes run from minus one through ten thousand so classroom demos and combinatorial filters remain feasible without unbounded memory growth on very large products.

There is no language model, no external arithmetic service, and no randomness, so the capability is safe to pin in continuous-integration checks and reproducible lesson materials.

Homework and contest verification

Students and graders confirm n!! for odd and even indexes, including the 0!! and (−1)!! conventions, without a local computer-algebra system.

Series and combinatorics scripts

Pipelines that expand arcsine-style series or count perfect matchings can call a deterministic double-factorial oracle instead of reimplementing BigInt products in every language.

Teaching same-parity products

Lesson pages that introduce n!! can show exact products beside the parity rule so learners connect the notation to the descending product definition.

What happens if n is less than −1?

Double factorial is not defined for integers below minus one; those calls are not charged.

Is the double factorial calculator free?

The browser tool runs free on your device.

How does double factorial differ from ordinary factorial?

Ordinary n! multiplies every integer from n down to 1. Double factorial n!! multiplies only the integers of the same parity as n, so it uses roughly half as many factors.

Why are 0!! and (−1)!! both equal to 1?

It is the standard convention: no positive factor enters the product, and setting the value to 1 keeps recurrences and series coefficients continuous at the origin. The calculator follows it for both values.

How large can n be in the double factorial calculator?

Any whole number from −1 up to 10,000. The product is built with exact whole-number arithmetic, so even results with thousands of digits keep every digit instead of being rounded.

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/double-factorial

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/double-factorial \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"n":7}'
{
  "n": 7
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "math.double_factorial",
  "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_n10000
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.

How this calculator computes n!! and validates input

The engine checks that n is present as a finite integer, at least minus one, and at most the published upper bound of ten thousand. For every other accepted n the implementation multiplies BigInt factors from n down by steps of two until it passes one, which is exactly the definition of the same-parity product. The response also echoes n, a notation string such as seven double-bang, the parity label odd or even, and the count of factors used. Send a JSON body with the required integer field n. Values below minus one fail immediately with invalid_input and are not charged, matching the mathematical domain stated in the product description. When n is zero or minus one, the response returns double_factorial equal to one under the standard conventions, with parity labeled convention and terms equal to zero because no positive factors enter the product. The result is returned as a JSON number when it fits inside the safe integer range, otherwise as a decimal string so clients never lose high-order digits. Missing n, non-integers, and values above the limit all fail with invalid_input.

Practical use, limits, pricing, and delivery

Each successful request is one billable item at $0.002; failed validation does not consume balance. Results are fully deterministic: the same n always yields the same double_factorial value, notation, parity, and term count. Wire the endpoint into number-theory demos, coding-interview sandboxes, discrete-math tutorials, or integer preprocessing steps where you already prefer exact double-factorial arithmetic over approximate heuristics or opaque black-box calculators that cannot show the product structure or the domain restriction below minus one.

How do I compute the double factorial n!! with this API?

Send a JSON body with integer field n (at least −1) to math.double_factorial. The response returns double_factorial, notation, parity, and terms.

What is 0!! and (−1)!!?

By standard convention both equal 1. This calculator returns double_factorial: 1 for n equal to 0 or −1.

Read the full KIT documentation →