DOLLARFR Function (LibreOffice Calc)
Learn the DOLLARFR function in LibreOffice Calc: Converts a price expressed as a decimal into a price expressed as a fraction.
Verification status: See the evidence and test scope described in this guide. How formula examples are checked
Availability and version history
- Introduced: Documented by LibreOffice 26.8.1.1; original introduction not established.
- Availability: Supported in LibreOffice 26.8.1.1, verified against its function registry. This identifies a supported release, not a final working version.
- Scope: Desktop Calc, using the English function name. Availability in other spreadsheet applications is separate.
- Checked: 2026-10-14 — function reference; versioned support. Documentation/source check; not a new native test. Existing example-specific test claims below retain their stated scope.
Validation scope: Native results mentioned below were recorded in saved LibreOffice Calc 25.2.3.2 Linux evidence on 13 October 2026 at 02:09 UTC. This later review checked its script and artifact hashes, 100 ODS/result comparisons and 68 fresh independent Decimal calculations. Calc was not rerun for this review. Historical observations do not certify other builds, locales or spreadsheet products.
DOLLARFR converts an ordinary decimal price into the fractional quotation notation used for some bonds and securities. It is the inverse of DOLLARDE. For instance, decimal price 100.15625, quoted in thirty-seconds, becomes the numeric quote 100.05: the .05 represents five thirty-seconds, not five cents.
Quick answer: =DOLLARFR(1.125;16) returns 1.02, which represents one whole unit plus two sixteenths. =DOLLARFR(1.125;8) returns 1.1, which represents one unit plus one eighth. Both are documented in the LibreOffice Calc Financial Functions Help, and both were reproduced in native LibreOffice Calc 25.2.3.2 on Linux.
Important: DOLLARFR does not round to the nearest exchange tick or convert a quote into a formatted string. The resulting cell contains an ordinary number encoding a fraction numerator. To produce an exchange-ready textual quotation with zero padding and permitted tick values, use a separate validation/formatting process.
Syntax and parameters
=DOLLARFR(DecimalDollar; Fraction)
| Parameter | Required? | Meaning | Typical value |
|---|---|---|---|
DecimalDollar |
Yes | The true price as a usual decimal number, such as 100.15625. |
100.15625 |
Fraction |
Yes | The positive integer denominator you want to use for the fractional quote. | 32 for thirty-seconds |
Both arguments are required; there are no optional parameters or defaults in the LibreOffice Help entry. Enter the semicolon-separated syntax shown for the tested Calc installation. Depending on locale and user settings, your decimal separator, argument delimiter, or local function names may differ: adapt the punctuation to the Formula Bar, not to Excel screenshots.
In OpenDocument 1.4 OpenFormula §6.12.17, this is a standard DOLLARFR function with the conceptual signature (Number Decimal; Integer Denominator) and constraint Denominator > 0. No undocumented _ADD suffix or Microsoft-only alias is needed in these Calc examples.
What a fractional quotation represents
Suppose a bond is priced at 100.15625 as an actual decimal number. In thirty-seconds, the amount above 100 equals 0.15625 × 32 = 5 thirty-seconds, so the fractional quote is 100.05 (100 and 5/32). In sixteenths, 0.15625 × 16 = 2.5, so DOLLARFR can produce a fractional-numerator encoding even where the market would not normally permit half a sixteenth. The number returned by DOLLARFR should not be confused with a guaranteed tick-valid market quote.
| Decimal input | Denominator | Mixed-fraction interpretation | Numeric DOLLARFR result |
|---|---|---|---|
1.125 |
8 |
1 + 1/8 | 1.1 |
1.125 |
16 |
1 + 2/16 | 1.02 |
1.3125 |
32 |
1 + 10/32 | 1.1 (numeric value; may be displayed as 1.10 in a dedicated quote format) |
100.03125 |
32 |
100 + 1/32 | 100.01 |
100.15625 |
32 |
100 + 5/32 | 100.05 |
1.9375 |
16 |
1 + 15/16 | 1.15 |
Note that DOLLARFR(1.3125;32) returns a numeric value equivalent to 1.10, which is usually displayed as 1.1 in General number format. Excel and Calc cannot distinguish an entered number 1.10 from 1.1 after numeric storage. If the quote’s printed fractional width matters, you must format or store it separately.
Reproducible formulas and expected results
These ordinary spreadsheet formulas were checked against independently computed decimal arithmetic; the saved test evidence records native Calc outputs for the listed numeric cases.
| Calc formula | Expected numeric result | Meaning |
|---|---|---|
=DOLLARFR(1.125;16) |
1.02 |
One and two sixteenths. |
=DOLLARFR(1.125;8) |
1.1 |
One and one eighth. |
=DOLLARFR(100.03125;32) |
100.01 |
100 and 1/32. |
=DOLLARFR(100.15625;32) |
100.05 |
100 and 5/32. |
=DOLLARFR(1.9375;16) |
1.15 |
One and 15 sixteenths. |
=DOLLARFR(2.25;16) |
2.04 |
Two and 4/16. |
=DOLLARFR(-1.125;16) |
-1.02 |
A negative decimal quotation. |
=DOLLARFR(3;32) |
3 |
No fractional portion. |
=DOLLARFR(1.125;1) |
1.125 |
With denominator 1, unchanged in tested Calc. |
=DOLLARFR(1.02;100) |
1.02 |
Denominator 100 matches ordinary decimal hundredths. |
All values are numeric Calc results, not preformatted text. Display precision and General number formatting may omit trailing zeros. For a bond quote intended to display 100.05, leave a separate original-text field so a later export does not mistake the encoded suffix for conventional cents.
A worksheet to generate quote encodings
Place this sample dataset in a blank sheet:
| Cell | Content |
|---|---|
A1 |
Actual decimal price |
B1 |
Quote denominator |
C1 |
Fractional quote (numeric) |
A2 |
100.15625 |
B2 |
32 |
A3 |
99.375 |
B3 |
32 |
In C2 enter:
=DOLLARFR(A2;B2)
Expected C2 result: 100.05. Copy the formula down to C3; expected result: 99.12 because 99.375 equals 99 plus 12/32. This makes it straightforward to generate a numeric intermediary for a fractional-pricing report. It does not, by itself, protect leading zeros or validate broker-required tick formats.
For calculations such as profits, spreads, accruals, or average purchase costs, use the true decimal price in column A instead of the encoded quote in column C.
The calculation, explained
DOLLARFR takes the decimal fractional portion, expresses it in the requested denominator, and places the resulting numerator after the decimal point using an encoding width appropriate for that denominator.
For a valid thirty-seconds price:
Decimal price: 100.15625
Whole part: 100
Fractional decimal part: 0.15625
Number of thirty-seconds: 0.15625 × 32 = 5
Encoded numeric quote: 100.05
For a sixteenths conversion:
Decimal price: 1.9375
Fractional decimal part: 0.9375
Number of sixteenths: 0.9375 × 16 = 15
Encoded numeric quote: 1.15
The fractional suffix is not an ordinary base-10 decimal amount. That is why you should not interpret 100.05 as 100 + 5/100 in downstream monetary calculations.
A teaching formula for nonnegative decimal inputs in thirty-seconds is:
=TRUNC(A2)+((A2-TRUNC(A2))*32)/100
Here A2=100.15625 produces 100.05. This decomposition illustrates only the 32-denominator encoding; it does not apply unchanged to other denominators, negative prices, or edge cases. For production use, call DOLLARFR and validate your quotation rules separately.
ODF specification nuance: ODF OpenFormula 1.4 §6.12.17 includes a simplified printed expression for DOLLARFR that omits the explicit base-ten suffix scaling needed to reproduce the LibreOffice Help examples. ODF establishes the function’s name and positive-denominator constraint, but the printed algebra alone should not be substituted for the documented and tested Calc 25.2.3.2 numeric behavior. This is an editorial documentation observation, not a claim that every ODF editor behaves identically.
Advanced patterns
Decode the result when performing arithmetic
If column A contains decimal prices and column B contains denominators, keep =DOLLARFR(A2;B2) only in your quotation-display/interchange column. To calculate a spread, use the original decimal-price cells. For instance, the difference between 100.15625 and 100.09375 is:
=100.15625-100.09375
Result: 0.0625 (two thirty-seconds). Subtracting their encoded quotation numbers would not necessarily yield that decimal spread.
Convert back with DOLLARDE
Because DOLLARDE reverses the encoding, you can check a well-formed price with:
=DOLLARDE(DOLLARFR(100.15625;32);32)
Result: 100.15625 in the tested version. Native round-trip tests were run for multiple denominators, positive values, negative values, and values with a zero whole part. They validate arithmetic on the selected cases; they do not prove that every possible market-specific text quotation survives a spreadsheet round trip byte-for-byte.
Make a quote-conversion report for different markets
When some instruments trade in eighths and others in thirty-seconds, put each denominator in its own column rather than creating separate hardcoded formulas:
=DOLLARFR(A2;B2)
One row may use B2=8 and another B3=32. Record the denominator and the original decimal price beside every generated quote. A plain number such as 100.1 is ambiguous without its denominator: it represents 100 + 1/8 with denominator 8, but 100 + 10/32 with denominator 32.
Validate inputs rather than silently accepting partial denominators
In the tested Calc version, a noninteger fraction denominator was truncated. If that is not acceptable for your data, reject it intentionally:
=IF(OR(B2<=0;B2<>TRUNC(B2));"Check denominator";DOLLARFR(A2;B2))
This formula returns the conversion only for a positive whole-number denominator. It does not check whether a decimal price lies exactly on the permitted 1/B2 tick grid. If exact ticks are required, a separate tolerance-based check can be applied:
=IF(ABS((A2-TRUNC(A2))*B2-ROUND((A2-TRUNC(A2))*B2;0))<0.00000001;"Tick aligned";"Fractional tick")
This condition is designed for nonnegative ordinary prices and a previously validated positive integer denominator. It tests whether the fractional portion corresponds approximately to a whole number of ticks. Adapt the tolerance to your business rules; floating-point errors and nonstandard exchange conventions require caution. For negative prices or specialized quotation schemes, validate the intended market convention separately.
Demonstrate why this is not tick rounding
Native Calc 25.2.3.2 returned approximately 1.1552 from:
=DOLLARFR(1.97;16)
This represents a fractional numerator of 15.52 sixteenths, not a permissible sixteenths tick. DOLLARFR did not round the input price to 1.9375 or 2.0. If you need rounding to the nearest tick before encoding, do it transparently before the DOLLARFR conversion, e.g. for positive prices, =DOLLARFR(ROUND(A2*B2;0)/B2;B2) for an integer denominator. This adds an explicit rounding policy and may not be suitable for instruments with different trading rules.
Errors and data-quality troubleshooting
| Condition | Native Calc 25.2.3.2 result | Explanation and remedy |
|---|---|---|
=DOLLARFR(1.125;0) |
Err:502 |
Denominator must be positive. |
=DOLLARFR(1.125;-2) |
Err:502 |
Negative denominator rejected. |
=DOLLARFR(1.125) |
Err:504 |
Both parameters are required. |
=DOLLARFR(1.125;2.9) |
1.025 | Tested Calc truncated 2.9 to denominator 2; do not rely on silent truncation for imported data. |
=DOLLARFR(1.97;16) |
1.1552 | Converts without quantizing a non-tick-aligned price. |
=DOLLARFR(1.125;"16") |
1.02 | Numeric-looking text denominator was coerced in the tested locale; cross-locale imports need explicit validation. |
=DOLLARFR("1.125";16) |
1.02 | Numeric-looking text price was also coerced in the tested locale. |
=DOLLARFR(1.125;TRUE()) |
1.125 | Boolean TRUE behaved as denominator 1 in the tested engine; not a recommended production input type. |
The cell displays 1.1 instead of 1.10 |
Same underlying number | Use an explicitly designed quote-display field; General formatting removes insignificant zeros. |
All rows above record what was actually observed in LibreOffice Calc 25.2.3.2 running in an English-number locale, not guaranteed behaviors of every edition or OS.
If a pasted formula generates a formula-parser error, check separators and whether the function name is correctly spelled. If an imported numeric column is stored as text, verify the active decimal/thousands separator conventions; see NUMBERVALUE. If the result appears off by a factor of 10 or 100, check the denominator and the number of quote-suffix digits: the same true price can encode differently in eighths, sixteenths, and thirty-seconds.
Precision: a price aligned to 1/32 is expressible exactly in binary, but spreadsheet formulas and decimal input/export can still show floating-point representation effects in intermediate calculations. Avoid rounding before spread or holdings calculations, and validate the final output against business rules. ROUND controls numeric rounding; it is not the same as DOLLARFR fraction encoding. See ROUND.
Compatibility and portability
| Platform or specification | What the official evidence supports |
|---|---|
| LibreOffice Calc | Current 26.8 Help documents the two-argument function and shows both eighths and sixteenths conversions. Native Calc 25.2.3.2, Linux was executed for these review tests. Results outside that tested version/platform are not claimed. |
| Microsoft Excel | Microsoft documents DOLLARFR for decimal-to-fraction conversions, including input constraints; documentation only, not native Excel testing. Adapt its comma-separated formula examples to your Calc locale. Error-code details can differ from Calc’s Err:502 and Err:504. |
| Google Sheets | Google documents DOLLARFR and an equivalent conceptual purpose; documentation only, not native Google Sheets testing. Pasted formulas may need punctuation changes in different locales. |
| OpenDocument/OpenFormula | The function name is documented in ODF 1.4 §6.12.17, with denominator strictly positive. Function availability in another editor and semantic agreement in all edge cases have not been executed. |
The existence of a documented function in another spreadsheet program is not proof of identical native results, rounding, typing behavior, or persistence through .xlsx import/export.
Frequently asked questions
Does DOLLARFR turn a number into ordinary fractions like 3/8?
It produces a fractional-price numeric notation, not a fraction-formatted cell or a text string. For example, decimal 1.375 with denominator 8 corresponds to 1 + 3/8, and DOLLARFR represents it numerically as 1.3. If you require text 1 3/8, that is a separate formatting task.
Why does a returned value omit a zero, such as 1.10 displaying as 1.1?
Calc stores both as the same number. =DOLLARFR(1.3125;32) returns an encoded numerator of ten thirty-seconds, represented numerically as 1.1. A trading report may need 1.10 as text; use dedicated output formatting rather than treating General number display as a complete exchange quote.
Can DOLLARFR decide the correct denominator automatically?
No. You must supply it. A quote in eighths may look similar to a quote in thirty-seconds but represent a different amount. Carry the denominator as explicit metadata, especially when merging financial datasets.
Is it a currency conversion function?
No. It expresses the same price in a different fractional quotation system. It does not convert CAD to USD, fetch market prices, or apply an exchange rate.
Does DOLLARFR snap the price to the nearest tick?
No. The native example DOLLARFR(1.97;16) produced 1.1552, indicating a fractional numerator rather than rounding to a valid sixteenths quote. Apply and document tick rounding separately if your workflow demands it.
Related guides and official evidence
- DOLLARDE — fractional quote back to the ordinary decimal price.
- TRUNC — isolate the whole-price portion for validation.
- MOD — derive a fractional remainder when designing custom quote checks.
- ROUND — numeric rounding, which is distinct from quote encoding.
- IF — guard against invalid imported denominator values.
Official references, reviewed 13 October 2026: LibreOffice Calc 26.8 Financial Functions Help — DOLLARFR, OASIS OpenDocument 1.4 OpenFormula §6.12.17, Microsoft Excel DOLLARFR, and Google Sheets DOLLARFR. The mathematical examples were independently checked and the saved ODS test workbook was evaluated natively with LibreOffice 25.2.3.2 on Linux. Excel and Sheets were not executed.