---
title: "Sample Size Calculator"
method: GET
path: "/api/calc/sample-size-calculator"
tags: ["Math"]
---

# Sample Size Calculator

`GET /api/calc/sample-size-calculator`

## Request

- Base URL: `https://calcbright.com`
- URL: `https://calcbright.com/api/calc/sample-size-calculator`
- Auth: none declared

385 responses give ±5% at 95% confidence. Get the survey sample size for any confidence level, margin of error and proportion, with small-population correction.

## Query parameters

- `conf` '80' | '85' | '90' | '95' | '98' | '99' | '99.9': Confidence level
- `margin` number: Margin of error (±%)
- `p` number: Expected proportion (%) Use 50% if unsure – it gives the largest, safest sample.
- `population` number: Population size Optional – leave blank for a large or unknown population.

## Response `200`

Calculation result

- CalcOutput
  - `ok` boolean
  - `tool` string
  - `name` string
  - `url` string: Open this link to see the full calculation
  - `inputs` object
  - `summary` string: Plain-text answer
  - `details` string
  - `result` object
  - `errors` object

## Other responses

- `400`: Invalid input (see errors)

---

[API](https://skmtc.dev/calcbright/apis/calcbright-calculator-api.md) · [All operations](https://skmtc.dev/calcbright/apis/calcbright-calculator-api/llms.txt) · [OpenAPI document](https://skmtc.dev/calcbright/apis/calcbright-calculator-api/revisions/f58229e56e58?raw)
