RAND in Calligra Sheets: Sample a Number from Zero Up to One
Learn Calligra Sheets RAND with exact arguments, reproducible inputs, independently checked results and implementation-specific cautions.
Verification status: See the evidence and test scope described in this guide. How formula examples are checked
Quick answer
RAND() returns a pseudo-random numeric sample. The inspected helper computes a C-library random integer divided by RAND_MAX + 1.0, so its intended numeric interval is 0 ≤ U < 1. Zero is possible; one is excluded by that calculation.
Syntax and evaluation
=RAND()
No arguments are accepted. There is no seed parameter. The wrapper calls the random helper when evaluated; that does not establish a background timer or guarantee that every unrelated edit reevaluates the cell. Recalculate deliberately when requesting a new sample, and preserve the value when a fixed scenario must remain reproducible.
The KDE RAND documentation describes a pseudo-random value between zero and one. This guide does not infer suitability for passwords, security tokens or regulated sampling from that description.
Check a sample without inventing its value
- In A2 enter
=RAND(). - Display enough decimal places to distinguish a value close to one from one itself.
- In B2 enter
=AND(A2>=0;A2<1). Expected result: true for the sampled numeric value. - Record A2 if you need to compare a saved workbook with a screenshot. Another evaluation need not reproduce it.
Use a reference to A2 for checks. Calling RAND separately in both sides of a test evaluates different samples and does not validate the original cell.
Practical example: a bounded scenario input
If a planning assumption may lie from 80 inclusive to 120 exclusive, place one RAND sample in A2 and use =80+40*A2 in B2. Independent endpoint arithmetic gives 80 ≤ B2 < 120. A hypothetical stored sample 0.25 would give 90, but 0.25 is an illustration, not an expected future random result.
Label B2 as a simulated input. Once you choose a scenario for comparison, preserve the sampled values separately from formulas so later evaluations do not silently replace it. A small sample set does not prove uniformity or independence; bounds are a different property from distribution quality.
Limits and troubleshooting
- Display rounding can show 1.000000 for an underlying number below one; inspect precision before diagnosing a bounds failure.
- Repeated samples may coincide. A duplicate does not by itself prove failure.
- There is no reproducible-seed argument in this function’s interface.
- A random sample is not a forecast and is not guaranteed to make a finite sample’s average equal 0.5.
- Other applications can use different generators and recalculation rules. Do not expect identical sequences after migration.
Availability and verification
- Release checked: Calligra Sheets 26.08.2, using KDE’s release source package and release information, inspected on October 18, 2026. Relevant locations:
sheets/functions/math.cpplines 183–185 and 803–807;sheets/engine/ValueCalc.cpplines 746–754. - Introduced: The original introduction version is not established by these sources. Current registration establishes presence in 26.08.2, not the first release.
- Lifecycle: Registered in the inspected release; no retirement or deprecation marker was found in this function’s registration. Retirement (removed support) and deprecation (discouraged but retained support) are different claims; neither is asserted here.
- Native testing: Selected cases were recalculated and saved in Calligra Sheets 25.04.2. The source discussion concerns 26.08.2. Unlisted examples and edge cases remain source-derived or independently calculated.
Related guides and sources
- AND
- AVERAGE
- MIN
- MAX
- Calligra function guide index
- KDE formula entry instructions, checked October 18, 2026. Examples use leading
=and semicolons, with a period for decimal numbers. Confirm regional separators in your installation before pasting.
Selected native results and screenshot
These results were observed in Calligra Sheets 25.04.2, using an ODS input evaluated and saved by the native application. Formula references and results were read back from the saved workbook. These are samples from one captured calculation state, not fixed expected future draws or a statistical distribution validation. Reopening or recalculating may produce different samples. The source discussion remains scoped to 26.08.2; native observations are 25.04.2.
| Native formula | Observed display |
|---|---|
=RAND() |
0.1234805915 |
=RAND() |
0.3650162765 |
Both recorded samples are within [0,1). Their particular decimal values are observations only; neither is a repeatability target or evidence of distribution quality.

Screenshot: Genuine native 25.04.2 capture. Selected F2 contains =RAND() and displays 0.1234805915. Column F contains application results; column G contains descriptive formula labels. Column G identifies the full formula. The formula bar can be horizontally clipped on longer function names; the saved workbook independently confirms the expression.