{
  "category": "Math and trigonometry functions",
  "display_name": "DEGREES",
  "entry_kind": "built_in_function",
  "eval_api": {
    "method": "POST",
    "url": "https://handbook.dnacalc.com/api/eval"
  },
  "function_id": "FUNC.DEGREES",
  "implementation_state": {
    "answer_bank": {
      "excel_builds": [
        "20430"
      ],
      "larger_numeric": 0,
      "last_bit": 0,
      "matched": 1225,
      "other_mismatch": 0,
      "refused": 2,
      "rows": 1227,
      "unread": 0,
      "worst_ulp": 0
    },
    "detail": "Of 1,230 recorded answers (1,227 in the answer bank and 3 workbook cells), 2 do not match: 2 are refused.",
    "dnacalc_commit": "9e1884369a678158dd82d3d74188daf986995e87",
    "in_catalogue": true,
    "state": "differs",
    "state_label": "Known larger differences",
    "summary": "Refuses 2 of 1,230 recorded calls; the rest match",
    "workbook_corpus": {
      "cells": 3,
      "matched": 3
    }
  },
  "implementations": [
    {
      "commit": "9e1884369a678158dd82d3d74188daf986995e87",
      "flavour": "excel-compatibility-candidate",
      "language": "Rust",
      "name": "CalcFunc",
      "own_code": [
        "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/catalogue/math.rs#L84-L86",
        "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/ported/degrees.rs#L4-L6"
      ],
      "repository": "https://github.com/DnaCalc/DnaCalc",
      "shared_code": [
        "catalogue/math::raw"
      ],
      "source": "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/catalogue/math.rs#L84-L86",
      "state": "differs",
      "suite": null,
      "summary": "Refuses 2 of 1,230 recorded calls; the rest match"
    }
  ],
  "json_url": "https://handbook.dnacalc.com/api/functions/FUNC.DEGREES.json",
  "name": "DEGREES",
  "notes": [],
  "schema": "efh.function-reference/v1",
  "section_order": [
    "what-it-does",
    "try-it",
    "quirks",
    "how-to-implement",
    "version-differences",
    "alternatives"
  ],
  "sections": {
    "alternatives": "\n### Relationships\n\n\n- **`RADIANS`** — the inverse, `y · π / 180`. The pair is the standard round-trip probe and\n  neither direction is exact.\n- **[COS](FUNC.COS.md), `SIN`, `TAN`** — the functions that make this one necessary, all of\n  which take radians. Microsoft's `COS` page recommends `RADIANS()` or multiplication by\n  `PI()/180` for exactly this reason.\n- **`PI()`** — the constant this function is scaled by, and the source of its irreducible error.\n- **`ACOS`, `ASIN`, `ATAN`, `ATAN2`** — the inverse trigonometric functions, which return\n  radians and are therefore the usual callers of `DEGREES`.\n- **`CONVERT`** — the general unit converter, which also handles angle units. Whether\n  `CONVERT(x, \"rad\", \"deg\")` and `DEGREES(x)` agree bitwise is a natural question and is\n  unchecked here.\n\n\n",
    "how-to-implement": "\n### Numerical notes\n\n\nThis function has exactly one design decision, and it decides the last bit of every result.\n\n**Two op-graphs, two different functions.**\n\n    (A)  result = x * (180/π)        — one rounding of the constant, one rounding of the product\n    (B)  result = (x * 180) / π      — `x*180` is exact when it does not overflow, then one division\n    (C)  result = x / (π/180)        — a third variant, with the constant rounded the other way\n\nForm (A) rounds `180/π` to a double first — an error of up to half an ulp in the *constant*,\nwhich becomes a relative error of up to half an ulp in every result — and then rounds the\nproduct. Two roundings, so up to one ulp of error, and the error is systematic: it has the same\nsign for every argument, because the constant is wrong in one fixed direction.\n\nForm (B) multiplies by `180` first. Since `180 = 4 · 45` and `45` needs six significand bits,\n`x * 180` is **exact** whenever it does not overflow — no rounding at all. Then one division by\nthe rounded `π`. That is one rounding of the constant and one of the division, so nominally the\nsame count, but the errors do not align the same way and the results differ on a substantial\nfraction of inputs. Form (B) also overflows earlier, at `ABS(x)` near `10^306`, because the\nintermediate `x*180` is larger than the result.\n\nForm (C) divides by a differently-rounded constant again.\n\nNone of the three is \"wrong\"; they are three functions that agree to within an ulp and disagree\nin the last bit. Which one a spreadsheet uses is a fact about the spreadsheet, and it is exactly\nthe kind of fact the Handbook exists to record. **The Handbook has not determined which form\nExcel uses**, and this page will not guess.\n\n**Why it is worth determining.** `DEGREES` is a scaling, so its error is purely relative and\nconstant across the range — there is no argument reduction, no cancellation, no conditioning\nproblem anywhere. That makes it an unusually clean probe: any disagreement between two\nimplementations is entirely attributable to the op-graph, with no confounding effects. It is\nthe ideal warm-up target for op-graph identification, and a resolved answer here would be a\nmodel for the harder surfaces in this batch.\n\n**The correctly-rounded target.** A `math-correct` implementation computes `x · 180/π` with the\nconstant to double-double precision and rounds once. That is achievable with a two-term split of\n`180/π` and one fused multiply-add, and it differs from all three forms above on the arguments\nwhere they are worst. Muller et al.'s *Handbook of Floating-Point Arithmetic* gives the\ntechnique and the analysis; Goldberg's paper gives the underlying one-rounding-versus-two\nargument in its standard form.\n\n\n",
    "quirks": "\n### Result and edge cases\n\n\nReturns `Number`.\n\n- **Zero** — `DEGREES(0)` is `0`, exactly, and it is the only exactly-preserved value other\n  than the sign structure.\n- **`DEGREES(PI())`** — not exactly `180`. `PI()` is the double nearest `π`, not `π`, so the\n  product is the scaled image of a slightly wrong angle. Whether it rounds *to* `180` anyway is\n  a question about the rounding of one multiplication, and the answer depends on which of the\n  two op-graphs below is used. This is the single most-noticed behaviour of this function.\n- **`DEGREES(RADIANS(x))`** — not `x` in general. Two roundings by reciprocal irrational factors\n  do not compose to the identity, and the round trip loses up to about one ulp.\n- **Underflow** — for subnormal arguments the product is scaled *up*, so `DEGREES` of a\n  subnormal is generally a normal number, and the operation recovers precision rather than\n  losing it. This direction is harmless.\n\n\n\n### Errors\n\n\nMicrosoft's `DEGREES` page documents no error conditions.\n\n| Error | Condition | Source |\n|---|---|---|\n| `#VALUE!` | Non-numeric argument | Shared call model, not this page |\n| `#NUM!` | The scaled result is not finite | `EV-MATH-0008`, which names `DEGREES` — a kind and error-code convention, no count |\n\n\n",
    "sources": "- Handbook evidence record `EV-MATH-0008` — the FINITE error-code convention with named\n  witnesses including a large `DEGREES` argument, and its explicit statement that it publishes\n  no count. Read its reader warning.\n- Muller et al., *Handbook of Floating-Point Arithmetic* — correctly rounded scaling by an\n  irrational constant; double rounding.\n- Goldberg, *What Every Computer Scientist Should Know About Floating-Point Arithmetic*.\n- Abramowitz & Stegun, chapter 4.3 — radian measure.\n- Handbook, [COS](FUNC.COS.md) — where the converted angle usually goes next;\n  [Coercion and lifting](../model/02-coercion-and-lifting.md).\n- Handbook projections `data/functions/FUNC.DEGREES.json` (the `non_finite=num` axis value) and\n  `data/presence/FUNC.DEGREES.json`.\n\n",
    "version-differences": "The recorded environments below distinguish a reading from a same-input comparison. Counts describe captured inputs in each environment; overlapping captures and comparisons are not totals of unique worksheet calls.\n\n| Excel 16.0 build | Platform and CPU | Captured inputs |\n|---|---|---:|\n| 19929 | Windows, bitness not recorded, CPU not recorded | 41 |\n| 20430 | Windows, 64-bit, CPU not recorded | 1,227 |\n\n- XC-DEGREES-001: build 19929 versus build 20430; 2 same-input pairs, 0 differing answers. Compared axes: excel-build. Numeric answers were compared by their recorded binary64 bits; other answers by typed value.\n\nAgreement on these compared inputs does not establish agreement on unmeasured inputs.\n\n[Recorded environments and comparison details](https://github.com/DnaCalc/ExcelFunctionsHandbook/blob/5dc75391aa5125ccc5abdb095da85950980d6fd8/content/evidence/environments/FUNC.DEGREES.json).",
    "what-it-does": "\n`DEGREES(angle)` converts an angle from radians to degrees. Microsoft's page says exactly that\nand gives the canonical example, `π` radians to 180 degrees.\n\n    DEGREES(x) = x · 180 / π\n\n| Property | Statement |\n|---|---|\n| Domain | all real `x` |\n| Range | all real values the format can hold; the map is a bijection on the reals |\n| Linearity | `DEGREES(ax + by) = a·DEGREES(x) + b·DEGREES(y)` — exactly, in the mathematics |\n| Parity | odd: `DEGREES(-x) = -DEGREES(x)` |\n| Fixed point | only `x = 0` |\n| Inverse | `RADIANS(y) = y · π / 180` |\n| Scale factor | `180/π = 57.29577951308232…`, an irrational, hence never exactly a double |\n| Overflow | the true value exceeds the double range once `ABS(x)` passes roughly `3.14 × 10^306` |\n\nThere is no analysis here at all: it is one multiplication by a constant. What makes the page\nworth writing is that a single multiplication by an *irrational* constant is exactly the\nsituation in which two obviously-equivalent formulas stop being equivalent, and this function is\nthe cleanest example of it on the entire worksheet surface.\n\n\n\n### Arguments\n\n\n| Argument | Meaning | Notes |\n|---|---|---|\n| `angle` | The angle in radians. Required. | Microsoft documents no constraint |\n\n"
  },
  "signature": {
    "display": "DEGREES(angle)",
    "parameters": [
      {
        "description": null,
        "name": "angle",
        "optional": false,
        "repeats": false
      }
    ],
    "trailing_repeats": false
  },
  "sources": {
    "metadata": {
      "admission": {
        "label": "implemented",
        "reason": null
      },
      "arity": {
        "max": 1,
        "min": 1
      },
      "category": "Math and trigonometry functions",
      "classification": {
        "arg_preparation_profile": "ValuesOnlyPreAdapter",
        "coercion_lift_profile": "UnaryNumericScalarOrArrayElementwise",
        "determinism_class": "Deterministic",
        "error_collapse_profile": "None",
        "fec_dependency_profile": "None",
        "host_interaction_class": "None",
        "kernel_signature_class": "NumToNum",
        "rich_value_usage": "RichBlind",
        "surface_fec_dependency_profile": "RefOnly",
        "thread_safety_class": "SafePure",
        "volatility_class": "NonVolatile"
      },
      "descriptions": {
        "long": null,
        "short": "Angle in radians expressed in degrees",
        "short_source": "dna-calc-own"
      },
      "docs": {
        "english_description": "Converts radians to degrees",
        "microsoft_url": "https://support.microsoft.com/en-us/office/degrees-function-4d6ec4db-e694-4b94-ace0-1cc3f61f9ba1"
      },
      "entry_kind": "built_in_function",
      "localized_family_names": null,
      "localized_names": [
        {
          "locale": "ar-SA",
          "name": "DEGREES"
        },
        {
          "locale": "bg-BG",
          "name": "DEGREES"
        },
        {
          "locale": "cs-CZ",
          "name": "STUPŇŮ"
        },
        {
          "locale": "da-DK",
          "name": "GRADER"
        },
        {
          "locale": "de-DE",
          "name": "GRAD"
        },
        {
          "locale": "el-GR",
          "name": "DEGREES"
        },
        {
          "locale": "en-AU",
          "name": "DEGREES"
        },
        {
          "locale": "en-GB",
          "name": "DEGREES"
        },
        {
          "locale": "en-US",
          "name": "DEGREES"
        },
        {
          "locale": "es-ES",
          "name": "GRADOS"
        },
        {
          "locale": "et-EE",
          "name": "DEGREES"
        },
        {
          "locale": "fi-FI",
          "name": "ASTEET"
        },
        {
          "locale": "fr-FR",
          "name": "DEGRÉS*"
        },
        {
          "locale": "he-IL",
          "name": "DEGREES"
        },
        {
          "locale": "hr-HR",
          "name": "DEGREES"
        },
        {
          "locale": "hu-HU",
          "name": "FOK"
        },
        {
          "locale": "id-ID",
          "name": "DEGREES"
        },
        {
          "locale": "it-IT",
          "name": "DEGREES"
        },
        {
          "locale": "ja-JP",
          "name": "DEGREES"
        },
        {
          "locale": "ko-KR",
          "name": "DEGREES"
        },
        {
          "locale": "lt-LT",
          "name": "DEGREES"
        },
        {
          "locale": "lv-LV",
          "name": "DEGREES"
        },
        {
          "locale": "nb-NO",
          "name": "GRADER"
        },
        {
          "locale": "nl-NL",
          "name": "GRADEN"
        },
        {
          "locale": "pl-PL",
          "name": "STOPNIE"
        },
        {
          "locale": "pt-BR",
          "name": "GRAUS"
        },
        {
          "locale": "pt-PT",
          "name": "GRAUS"
        },
        {
          "locale": "ro-RO",
          "name": "DEGREES"
        },
        {
          "locale": "ru-RU",
          "name": "ГРАДУСЫ"
        },
        {
          "locale": "sk-SK",
          "name": "STUPNE"
        },
        {
          "locale": "sl-SI",
          "name": "DEGREES"
        },
        {
          "locale": "sr-Latn-RS",
          "name": "STEPENI"
        },
        {
          "locale": "sv-SE",
          "name": "GRADER"
        },
        {
          "locale": "th-TH",
          "name": "DEGREES"
        },
        {
          "locale": "tr-TR",
          "name": "DERECE"
        },
        {
          "locale": "uk-UA",
          "name": "DEGREES"
        },
        {
          "locale": "vi-VN",
          "name": "DEGREES"
        },
        {
          "locale": "zh-CN",
          "name": "DEGREES"
        },
        {
          "locale": "zh-HK",
          "name": "DEGREES"
        },
        {
          "locale": "zh-TW",
          "name": "DEGREES"
        }
      ],
      "signature": {
        "display": "DEGREES(angle)",
        "parameters": [
          {
            "description": null,
            "name": "angle",
            "optional": false,
            "repeats": false
          }
        ],
        "trailing_repeats": false
      },
      "surface_name": "DEGREES",
      "version_marker": null,
      "xlcall": {
        "code": "343",
        "symbol": "xlfDegrees"
      }
    },
    "microsoft": "https://support.microsoft.com/en-us/office/degrees-function-4d6ec4db-e694-4b94-ace0-1cc3f61f9ba1"
  },
  "try_it": {
    "formula": "=DEGREES(0)"
  },
  "url": "https://handbook.dnacalc.com/functions/DEGREES.html",
  "variants": [],
  "versions": [
    {
      "behaviour": "41 captured inputs are indexed for this environment. Capture dates are not recorded. This is a reading count, not a comparison with another build.",
      "excel_build": "16.0 build 19929",
      "platform": "Windows, bitness not recorded, CPU not recorded",
      "sources": [
        "https://github.com/DnaCalc/ExcelFunctionsHandbook/blob/5dc75391aa5125ccc5abdb095da85950980d6fd8/content/evidence/environments/FUNC.DEGREES.json"
      ]
    },
    {
      "behaviour": "1,227 captured inputs are indexed for this environment. Capture dates: 2026-09-29 to 2026-09-29. This is a reading count, not a comparison with another build.",
      "excel_build": "16.0 build 20430",
      "platform": "Windows, 64-bit, CPU not recorded",
      "sources": [
        "https://github.com/DnaCalc/ExcelFunctionsHandbook/blob/5dc75391aa5125ccc5abdb095da85950980d6fd8/content/evidence/environments/FUNC.DEGREES.json"
      ]
    }
  ]
}