Math and trigonometry functions

SIN

Matches all 2,156 recorded answers

Recorded: 2,129 in the answer bank and 27 workbook cells. How we measure this · See the Rust code

Local names in 40 languages
LanguageName in Excel
ArabicSIN
BulgarianSIN
CzechSIN
DanishSIN
GermanSIN
GreekSIN
English (Australia)SIN
English (United Kingdom)SIN
English (United States)SIN
SpanishSEN
EstonianSIN
FinnishSIN
FrenchSIN
HebrewSIN
CroatianSIN
HungarianSIN
IndonesianSIN
ItalianSEN
JapaneseSIN
KoreanSIN
LithuanianSIN
LatvianSIN
NorwegianSIN
DutchSIN
PolishSIN
Portuguese (Brazil)SEN
Portuguese (Portugal)SEN
RomanianSIN
RussianSIN
SlovakSIN
SlovenianSIN
Serbian (Latin)SIN
SwedishSIN
ThaiSIN
TurkishSİN
UkrainianSIN
VietnameseSIN
Chinese (Simplified)SIN
Chinese (Hong Kong)SIN
Chinese (Traditional)SIN

Names from Microsoft's support site.

What it does

SIN(number)

SIN(number) is the circular sine of an angle measured in radians.

The defining power series, entire over the whole complex plane and convergent for every real argument, is

sin x  =  x - x^3/3! + x^5/5! - x^7/7! + ...  =  SUM over k>=0 of (-1)^k x^(2k+1) / (2k+1)!

equivalently, in exponential form,

sin x  =  (e^(ix) - e^(-ix)) / (2i)
  • Domain: all real numbers. There is no argument at which the mathematical function is undefined, and there are no poles and no branch cuts — sine is entire.
  • Range: the closed interval [-1, 1].
  • Parity and period: odd (sin(-x) = -sin x), periodic with period 2*pi, and antiperiodic with period pi (sin(x + pi) = -sin x).
  • Zeros: exactly the integer multiples of pi. Note the consequence for a spreadsheet: the only representable double at which SIN is mathematically zero is 0 itself, because no other multiple of pi is a binary64 number.
  • Limiting behaviour: sin x / x -> 1 as x -> 0; the leading error of the approximation sin x ~ x is -x^3/6. There is no limit as x -> +/-infinity; sine oscillates forever.

The identities a reader is most likely to want, in Abramowitz & Stegun's numbering region 4.3: sin^2 x + cos^2 x = 1, sin(x +/- y) = sin x cos y +/- cos x sin y, sin 2x = 2 sin x cos x, and the half-angle and product-to-sum forms that follow from them.

Microsoft's page states the calling convention in one remark: the argument is in radians, and degrees must be converted, either by multiplying by PI()/180 or by passing the argument through RADIANS. That remark is the whole of the documented semantics.

Arguments

ArgumentMeaningDefault
numberThe angle, in radians. Required.—

The commonly misunderstood position is the only position: readers who type SIN(30) expecting one half are asking for the sine of thirty radians, and get a legitimate answer to a different question. Nothing in the function can detect the mistake.

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

Returns Number.

Two edges deserve naming:

  • Small arguments. For arguments below the point where x^3/6 underflows relative to x, the correctly rounded sine of x is x itself. Subnormal inputs therefore round-trip.

Empty, missing and error arguments follow the shared call model; see The value universe.

How to implement

Numerical notes

Everything hard about SIN is argument reduction. The kernel — a minimax polynomial in x over roughly [-pi/4, pi/4] — is a solved problem and has been since Cody & Waite. The difficulty is getting x into that interval.

Why reduction is hard. To evaluate sin x you need r = x - n*(pi/2) accurately, where n = round(2x/pi). The cancellation in that subtraction is total: when x is large, x and n*(pi/2) agree in most of their leading bits, and every bit of accuracy in r has to come from bits of pi that were not in the working precision to begin with. The number of bits of pi required grows with the exponent of x; near the top of the binary64 range it runs into the low thousands. This is the content of Payne & Hanek's method: keep 2/pi to enough bits, multiply, and discard the integer part exactly.

The three regimes.

  1. Small x (below about pi/4): no reduction, evaluate the kernel directly.
  2. Moderate x: Cody-Waite reduction, subtracting a two- or three-part split of pi/2 whose high parts have trailing zero bits so that the products are exact.
  3. Huge x: Payne-Hanek, or an equivalent exact reduction against a stored many-bit 2/pi. fdlibm's __rem_pio2 and __kernel_rem_pio2 are the canonical readable implementation; Boost.Math and the Sun-derived libms in wide use follow it.

The philosophical trap. For huge x, the "right" answer is a matter of definition. The double x is an exact rational; sin of that rational is a well-defined real number, and an exact reduction computes it. But the user's x was almost certainly a rounded stand-in for something else, and the sine of the intended value is unrelated. Both positions are defensible: some libraries reduce exactly and return the mathematically correct value for the argument they were handed; others refuse. A library that refuses is making a usability argument, not a numerical one, and a page like this one should say which position an implementation has taken rather than treat one as correct.

What the attached evidence record says about substrate. EV-MATH-0004 is a substrate-identification record covering the trig six. It names, for the family, the x87 FSIN/FPTAN chain with FPREM1 argument reduction against the x87 ROM value of pi, and it carries a host-CPU microcode caveat on those instructions. The consequence a reader should take from it is structural, not numeric: an x87-FPREM1-based reduction uses a fixed, finite approximation to pi, so the reduction is not exact, and the error it introduces grows with the magnitude of the argument. That is a different failure mode from a Payne-Hanek library, and it is the mechanism by which two implementations that agree perfectly on small angles can disagree wildly on large ones. The record explicitly rules out Cody-Waite reduction against an extended pi as the substrate. Read the record itself for what was counted and how; this page deliberately states none of its figures.

The residual sensitivity. Near a zero of sine — that is, near a multiple of pi — the relative error of any implementation is dominated by the reduction, because sin is locally linear through zero and the absolute error in r becomes the whole answer. Test vectors that only sample away from multiples of pi will not see the difference between a good reduction and a bad one.

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.

SIN · 3 lines · calc-func/src/catalogue/math.rs on GitHub
18 sin "SIN" (1, 1) [V "number"] |s, a, sv| {
    raw(s, a, ExcelRealPolicy::CIRCULAR_TRIG, k::sin::sin_kernel)
}
sin_kernel · 5 lines · calc-func/src/ported/sin.rs on GitHub
/// W109 G4-01: the SIN chain (see `excel_numeric::excel_sin`),
/// bit-exact to live Excel below the 2^27 guard.
pub fn sin_kernel(n: f64) -> f64 {
    crate::ported::excel_numeric::excel_sin(n)
}

Kernels shared with other functions

  • raw catalogue/math
  • sin_with ported/excel_numeric
  • excel_sin ported/excel_numeric
  • pack_raw ported/excel_numeric/soft87
  • zero ported/excel_numeric/soft87
  • inf ported/excel_numeric/soft87
  • pack ported/excel_numeric/soft87
  • ext_pi ported/excel_numeric/soft87
  • ext_chs ported/excel_numeric/soft87

Argument and result plumbing

  • num catalogue/kit
  • out catalogue/kit

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

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.

Excel 16.0 buildPlatform and CPUCaptured inputs
19929Windows, bitness not recorded, CPU not recorded35
20131Windows, bitness not recorded, AMD Ryzen 7 4800H with Radeon Graphics890
20228Windows, 64-bit, CPU not recorded9
20430Windows, 64-bit, CPU not recorded1,224
  • XC-SIN-001: build 19929 versus build 20430; 1 same-input pairs, 0 differing answers. Compared axes: excel-build. Numeric answers were compared by their recorded binary64 bits; other answers by typed value.
  • XC-SIN-002: build 20131 versus build 20228; 1 same-input pairs, 0 differing answers. Compared axes: excel-build. Numeric answers were compared by their recorded binary64 bits; other answers by typed value.
  • XC-SIN-003: build 20131 versus build 20430; 1 same-input pairs, 0 differing answers. Compared axes: excel-build. Numeric answers were compared by their recorded binary64 bits; other answers by typed value.

Agreement on these compared inputs does not establish agreement on unmeasured inputs.

Recorded environments and comparison details.

Excel 16.0 build 19929

Windows, bitness not recorded, CPU not recorded

35 captured inputs are indexed for this environment. Capture dates are not recorded. This is a reading count, not a comparison with another build.

Excel 16.0 build 20131

Windows, bitness not recorded, AMD Ryzen 7 4800H with Radeon Graphics

890 captured inputs are indexed for this environment. Capture dates: 2026-07-11 to 2026-07-11. This is a reading count, not a comparison with another build.

Excel 16.0 build 20228

Windows, 64-bit, CPU not recorded

9 captured inputs are indexed for this environment. Capture dates: 2026-08-09 to 2026-08-09. This is a reading count, not a comparison with another build.

Excel 16.0 build 20430

Windows, 64-bit, CPU not recorded

1,224 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.

Alternatives

Relationships

  • COS and TAN — the other two primaries. TAN = SIN/COS; COS(x) = SIN(x + pi/2).
  • ASIN — the inverse on the principal branch [-pi/2, pi/2]. ASIN(SIN(x)) recovers x only inside that interval; outside it the composition folds.
  • SINH — the hyperbolic sibling, related by sin(ix) = i sinh(x). Bounded versus unbounded is the practical difference, and it is why the two have completely different overflow stories.
  • RADIANS / DEGREES / PI — the conversion apparatus Microsoft's remark points at.
  • Confused with: nothing in Excel, but frequently confused with itself in degrees. There is no degree-mode sine.

Named variants

No named variants are recorded yet.

Suggest a correction or contribute an implementation · For agents