Quick answer

Enter nonnegative integers n (total) and k (chosen). The page displays C(n, k) using exact integer math.

Formula

  • Implements multiplicative formula with BigInt
  • Updates as you type

Introduction

Open the calculator at the top of the home page in the hero section. It stays there so you can scroll through explanations and jump back with one tap on mobile.

If you are learning the math for the first time, read how to calculate binomial coefficients for manual methods, then use this tool as a checker rather than a black box.

For notation questions (why the page says k instead of r), the n choose r calculator article explains that r and k are the same selected count with different labels.

Field-by-field behavior

n labels the size of the full distinct set. Examples: number of students, lottery balls, or terms in a polynomial exponent context when counting coefficient indices.

k labels how many you select without order. The tool rejects decimal input, negative values, and k greater than n because those cases are either invalid or zero by convention.

The notation line under the result mirrors conventional C(n, k) typesetting so you can copy the pair into notes or slides.

What happens under the hood

  • Uses product form with exact division each step
  • Applies symmetry internally when helpful
  • Caps inputs at 1000 for responsiveness

Floating-point factorials break near n = 20 on some devices. Integer products with division only when the division is guaranteed exact avoids rounding drift.

Nothing is uploaded: calculations run locally in your browser session. Refreshing clears inputs unless your browser restores form state.

Step-by-step guide

  1. Enter n. Whole numbers only. Leading zeros are trimmed on parse.
  2. Enter k. If k > n, read the error message instead of expecting a number.
  3. Read C(n, k). Large answers include digit grouping commas for readability.
  4. Clear and repeat. Use Clear inputs between problems so old values do not leak into class demos.

Verification set

C(10, 3) = 120 appears in countless probability exercises.

C(7, 2) = 21 is a symmetry-friendly check.

C(0, 0) = 1 tests edge logic (empty set subset).

Try C(20, 10) = 184756 to see large integer formatting without precision loss.