Contact

ISPRIME Function (Gnumeric)

Math Beginner Gnumeric

Check whether an integer is prime using Gnumeric ISPRIME. Includes formula syntax, a 17 example and input considerations.

Verification status: See the evidence and test scope described in this guide. How formula examples are checked

The ISPRIME function in Gnumeric is used for this task: Part of the Gnumeric number theory functions; distinguishes prime integers from composite ones.

This guide explains how to read the formula, reproduce a concrete example, interpret its result and recognize common input mistakes.

Availability and version history

  • Introduced: Documented by 1.12.62; original introduction not established.
  • Availability: Supported in Gnumeric 1.12.62, based on the function-specific registration.
  • Scope: Desktop; the fn-numtheory function module must be included and enabled.
  • Checked: October 14, 2026. Documentation/source check; no new native test in Gnumeric 1.12.62.

Syntax and arguments

ISPRIME(n)

Gnumeric formulas normally use commas (,) between arguments. These examples are written for Gnumeric rather than copied unchanged from LibreOffice Calc.

Worked example

=ISPRIME(17)

Expected result: TRUE.

Why it works: Tests whether 17 is a prime number.

Another practical example

Practice inputs: Input 21 is composite.

=ISPRIME(21)

Expected result: FALSE.

21 factors as 3×7, so it is composite rather than prime. Compare with 17 in the first example.

What to watch for

Negative numbers, zero, and one are not prime numbers.

For LibreOffice Calc formulas, separators are commonly semicolons; the Gnumeric examples here use commas. The arithmetic or official reference supplies the expected result, but Gnumeric has not been executed for this review.

How to use it in your own spreadsheet

  1. Identify the cells or inputs that correspond to the sample values above.
  2. Enter the formula in an empty cell, changing the references or literal values to match your sheet.
  3. Compare the output with a manual check on a small known example.
  4. Extend the formula to a larger dataset only after you understand the result.

Common problems and practical checks

  • Check the accepted numeric domain, units and array dimensions for the specific operation.
  • If an error appears, check that the function arguments are of the expected type.
  • A pasted formula may produce an error when it uses the other program’s argument separator or unsupported options.

Documentation and verification