POLR in Calligra Sheets: Find a Cartesian Point’s Radius
Calculate 2D Cartesian vector lengths with POLR(X;Y), worksheet data, advanced distance use and Calligra 26.08.2 implementation notes.
Verification status: Consult the documentation and examples below. Native application testing has not been documented for this guide. How formula examples are checked
Quick answer
POLR converts a point’s Cartesian x and y components into its nonnegative distance from the origin: =POLR(X;Y). The official reference documents =POLR(12;0) → 12 and =POLR(12;12) → approximately 16.9705. The independent precise mathematical value of the second is 16.9705627485. Both parameters must be numeric components in x; y order. KDE function handbook; pinned source.
This is a source/documentation-verified numerical guide, not a claim of running the Calligra function in a live application.
What distance does POLR measure?
For point (x,y), the polar radius is the Pythagorean length of its vector from (0,0):
r = √(x² + y²)
The 26.08.2 func_polr wrapper squares each parameter, adds the squares and calls the Calligra sqrt helper. The result has no direction information and is the same for (3,4), (−3,4), (3,−4) and (−3,−4). POLR is therefore suitable for lengths and radii, not headings or quadrants. Unlike POLA, the source does not divide by the radius, so a zero vector has an independent mathematical expected radius of 0. The actual UI has not been tested. Pinned code; official documented examples.
Exact syntax, argument order and defaults
=POLR(X;Y)
| Position | Parameter | Required? | Declared type (26.08.2 https://github.com/KDE/calligra/blob/72123cc643f6625351139e7df294544255a1056f/sheets/functions/conversion.xml) | Meaning |
|---|---|---|---|---|
| 1 | X |
Yes | Double |
Numeric horizontal component of a Cartesian coordinate. |
| 2 | Y |
Yes | Double |
Numeric vertical component of a Cartesian coordinate. |
Both are required, with no optional arguments/defaults in the official XML metadata and an explicit two-argument source registration. A numeric cell reference or numeric expression may be used. Input is x first, y second, not y;x, not an angle and radius pair. English examples use semicolons. Formula-entry instructions show how to use Insert → Function and may need localized decimal separators when installed elsewhere. KDE handbook; pinned metadata; pinned C++ registration; KDE function dialog.
Version scope: Documentation read alongside the official 26.08.2 source (released October 8, 2026). No native application, package, OS or locale was used to observe results. KDE release list.
Reproducible worksheet: eleven coordinate cases
- Start a blank Calligra sheet. In row 1 put Point (A1), x (B1), y (C1), POLR (D1), and Companion value, independent model (E1).
- Enter the numeric x and y components for rows 2 through 12 as listed. Use numbers (not quoted strings), including negative signs. The zero-vector case in row 11 is intentionally reserved for troubleshooting.
- In D2 enter
=POLR(B2;C2)and copy/fill down through D12. Format to nine decimal places to compare expectations. The companion values are independently calculated rather than native results. - For the zero vector, do not treat a purely mathematical expectation as evidence of Calligra’s UI error display. The table explicitly differentiates the pinned source-level outcome where relevant.
| Row | Label A | x in B | y in C | D formula | Independently expected D | Complementary value |
|---|---|---|---|---|---|---|
| 2 | 3-4-5 vector | 3 | 4 | =POLR(B2;C2) |
5.000000000 | 0.927295218 |
| 3 | Lower-right | 3 | -4 | =POLR(B3;C3) |
5.000000000 | 0.927295218 |
| 4 | Upper-left | -3 | 4 | =POLR(B4;C4) |
5.000000000 | 2.214297436 |
| 5 | Lower-left | -3 | -4 | =POLR(B5;C5) |
5.000000000 | 2.214297436 |
| 6 | KDE example | 12 | 12 | =POLR(B6;C6) |
16.970562748 | 0.785398163 |
| 7 | Positive x | 12 | 0 | =POLR(B7;C7) |
12.000000000 | 0.000000000 |
| 8 | Positive y | 0 | 12 | =POLR(B8;C8) |
12.000000000 | 1.570796327 |
| 9 | Negative y | 0 | -12 | =POLR(B9;C9) |
12.000000000 | 1.570796327 |
| 10 | Negative x | -12 | 0 | =POLR(B10;C10) |
12.000000000 | 3.141592654 |
| 11 | Origin | 0 | 0 | =POLR(B11;C11) |
0.000000000 | undefined at origin |
| 12 | 5-12-13 triangle | 5 | 12 | =POLR(B12;C12) |
13.000000000 | 1.176005207 |
The values were calculated outside Calligra with Python math.hypot(x,y) for radius and math.acos(x/math.hypot(x,y)) for the inspected POLA algorithm when radius was nonzero. This is an independent numerical model following the pinned implementation, not a native function invocation. The expected values are rounded; output may differ in the least significant displayed decimal through floating-point conventions. [KDE XML metadata](https://github.com/KDE/calligra/blob/72123cc643f6625351139e7df294544255a1056f/sheets/functions/conversion.xml); pinned calculation code.
Advanced example 1: two-dimensional distance between points
Suppose you record start coordinates (A2=2, B2=3) and destination (C2=5, D2=7). Compute deltas Δx=3, Δy=4 using:
=POLR(C2-A2;D2-B2)
Independently expected distance: 5 units. This is a straight-line planar distance, not road distance or geographic distance on a spherical Earth. If you are measuring geographical latitude/longitude, a different model is needed. The expression mirrors =SQRT((C2-A2)^2+(D2-B2)^2) mathematically for ordinary finite numeric values. POLR wrapper; KDE SQRT reference.
Advanced example 2: distance threshold for an object
Put object x in B2, y in C2 and allowed distance from the origin 5 in D2:
=IF(POLR(B2;C2)<=D2;"Within radius";"Outside radius")
For (3,4), independently expected Within radius at a threshold of 5. For (6,8) independently expected Outside radius, because the radius is 10. The IF function is available as Calligra’s source-registered spreadsheet function, but this combined formula has not been executed natively. This is a useful geometric filter that keeps x/y signs intact even though POLR itself ignores sign in the result. POLR source.
Advanced example 3: restore a radius after a polar projection
If radius 10 and angle =PI()/6 produced coordinates through CARX and CARY, the reconstructed radius can be checked with:
=POLR(CARX(10;PI()/6);CARY(10;PI()/6))
Independently expected 10 within floating-point rounding. This identity is a consistency check; it cannot recover the original angle or quadrant. These companion names are independently registered functions in the source. KDE conversion-module source.
Errors, numerical limits and troubleshooting
| Situation | What is established and what to do |
|---|---|
| Negative x or y | Both are squared in the pinned implementation. The mathematical length is nonnegative; negative inputs are not a reason to use ABS on each coordinate first. |
| Both x and y are zero | Independent mathematical expected length is 0; no special zero-vector branch in the POLR wrapper. Native rendering/coercion remains untested. |
| Wrong answer for distance between locations | Function expects coordinate differences, not two absolute positions, unless the origin is one endpoint. Subtract end−start for both axes. |
| Very large components | The pinned wrapper squares components before taking the root. Intermediate overflow/precision issues may occur on some inputs; no actual numeric limit or specific visible error was verified. |
| Non-numeric strings, blanks, special values | The checked wrapper uses general calculation helpers. Coercion and UI errors were not natively verified. Use clean numeric data and test edge cases. |
| Formula rejected | It needs exactly two arguments and locale-correct separators: =POLR(B2;C2) in English reference syntax. |
| Direction also needed | A radius alone cannot say northeast versus southwest. Do not mistake POLR for an angle; examine POLA’s implementation caveat below and use signed-angle mathematics if the quadrant matters. |
Error-message integrity: No source branch in func_polr explicitly returns a named error for (0,0). That does not authorize claiming all input types succeed or a particular error display. Pinned code.
Portability and compatibility
The Pythagorean expression =SQRT(x^2+y^2) is a mathematical alternative for finite numeric inputs, using the KDE-documented SQRT function. In a Calligra worksheet, =POLR(B2;C2) can be compared with =SQRT(B2^2+C2^2). Calligra’s specific POLR name, internal overflow behavior and error coercions must not be assumed to exist identically in another spreadsheet. No Excel, Sheets or LibreOffice runtime tests were performed. KDE POLR; KDE SQRT.
Why not use POLA for distance?
POLA is an angle function, not a distance function. The pinned implementation of POLA calls POLR first, divides x by the resulting radius and takes inverse cosine. Its angle can lose the sign of y; the two functions are complementary for a specific source implementation but do not by themselves guarantee a full directional reconstruction. Source of both implementations.
Verified related functions and source links
Explore the related mathematical functions below:
- SIN in Calligra Sheets — sine of a radian angle.
- COS in Calligra Sheets — cosine of a radian angle.
- PI in Calligra Sheets — reference for π and the unit circle.
- RADIANS in Calligra Sheets — degrees to radians.
- DEGREES in Calligra Sheets — radians to degrees.
- SQRT in Calligra Sheets — square root; useful for vector length.
- ACOS in Calligra Sheets — inverse cosine; useful for understanding POLA’s implementation.
CARX and CARY calculate Cartesian components; POLR calculates length. POLA has a separate source-level quadrant limitation described above.
Evidence and dated verification
Research checked on 2026-10-13 UTC:
- KDE Sheets function handbook — this function documents function name, syntax, argument labels, return type and examples. Its handbook text is not proof of runtime behavior on every version.
- KDE Calligra 26.08.2 pinned
conversion.xmlspecifies the two ordered Double parameters and related functions. - KDE Calligra 26.08.2 pinned
conversion.cppregisters the function and reveals its implementation, including caveats the handbook omits. - KDE Sheets formula-entry instructions document Insert → Function, the
=formula format and the semicolon between arguments in the English handbook. - KDE Calligra Sheets release list identifies 26.08.2 as released October 8, 2026.
What was and was not validated: Documentation inspection: yes. Version-pinned source review: yes. Mathematical outputs: independently calculated in Python’s standard math module. Native Calligra execution: no. No Linux, Windows, Flatpak or other platform build was run; no locale-specific execution or UI screenshots were captured.