Operators

Division (/)

Matches all 198 recorded answers

Recorded: 198 workbook cells. How we measure this · See the Rust code

No local names are recorded for this entry.

What it does

number1 / number2

A / B converts each operand to a number and returns the IEEE-754 binary64 quotient, rounded once to nearest with ties to even — except that a zero divisor does not produce an IEEE infinity but a worksheet error.

Everything else is the shared story: / never sees a cell, and each operand is converted by the to-number rules of coercion and lifting.

Arguments

PositionNameMeaning
0ADividend (numerator). Required.
1BDivisor (denominator). Required.

Arity is exactly 2; no optional arguments, no defaults. Order is load-bearing. In the array case, the divisor position is where the interesting failures live: a single zero anywhere in a broadcast divisor array produces #DIV/0! in exactly the coordinates it reaches, not in the whole result — per-cell failures stay per-cell under the lifting rule of chapter 02.

Try it

Input cells (optional)

Example: {"B2": 3, "B3": 4}. A1 holds the formula. Other cells need values before a formula can read them.

Enter a formula, then calculate.

Runs locally in your browser with OneCalc. Its answer may differ from Excel. Use English function names and commas between arguments.

Quirks

Result and edge cases

  • Zero divisor. #DIV/0!, including the 0/0 case. Chapter 01 also lists division by an empty cell as a documented cause of #DIV/0!, which is a useful hint about the family's Empty policy — but the Handbook has not recorded that behaviour for / against Excel and does not assert it here.
  • Text and logical operands. Shared to-number rules.
  • Exactness. Division is exact only when the quotient is representable — mainly powers of two and small integer ratios. 1/3, 1/10 and most currency ratios are not exact, which is the root of the classic "my totals are off by a cent" report. The operator is not at fault; binary64 has no exact tenth.

How to implement

Notes for implementers

  • Check the divisor after coercion, not before. "0" as text coerces to zero and must reach the same #DIV/0! lane as numeric zero; a pre-coercion check on the raw value misses it.
  • Do not strength-reduce a/b into a * (1/b). The reciprocal introduces a second rounding and changes results in the last bit. Compilers do this under fast-math flags; a compatibility implementation must forbid them.
  • A negative zero divisor is still a zero divisor. x / -0 must take the #DIV/0! lane, not produce a negative infinity.
  • In the array case, produce the error per coordinate. Collapsing the whole result to #DIV/0! because one cell divided by zero contradicts the per-cell failure rule of chapter 02.

Rust code

Show the CalcFunc source of this function

Quoted from the public repository DnaCalc/DnaCalc, crates calc-func and calc-fml, at commit 9e1884369a67. Comments are the source's own. A kernel shared with other functions appears once, on its module page.

/ infix · 1 lines · calc-func/src/catalogue/arithmetic.rs on GitHub
CatalogueEntry::operator(DIVIDE, "/", Notation::Infix, NUMBERS, divide)

Kernels shared with other functions

Argument and result plumbing

No implementation has been published with a Handbook test suite for this function.

Version differences

No comparison between specific Excel builds is recorded here yet. This does not establish that all builds behave alike.

Alternatives

Relationships

  • FUNC.OP_MULTIPLY — the inverse operation. a/b and a*(1/b) are not the same double in general: the second rounds twice.
  • QUOTIENT — integer division, returning the truncated integer part. Different function, different error surface.
  • MOD — the remainder companion. MOD has its own sign convention (it follows the divisor) which does not match the truncation implied by QUOTIENT; do not assume a = b*QUOTIENT(a,b) + MOD(a,b) without checking.
  • IFERROR, IFNA — the usual wrappers readers reach for when a divisor may be zero. IFERROR masks every error, not only #DIV/0!, which is a common source of hidden bugs.
  • IMDIV — complex division over text-encoded complex numbers.

Named variants

No named variants are recorded yet.

Suggest a correction or contribute an implementation · For agents