# setPowerset() Function & Examples

Use the setPowerset() set function in Calcul.io. Review its syntax, edit working examples, understand the result, and explore related math functions.

## setPowerset

#### setPowerset(set)

Try it yourself:

```calculio
setPowerset([1, 2, 3])
```

---

## Generate all subsets with setPowerset

**setPowerset** returns the power set: every possible subset of an input set, including the empty set and the full set.

## Example

A three-member set has eight subsets. This is useful for exhaustive feature choices and small combinatorial searches. Compare [combinations](https://calcul.io/function/combinations/index.md) when only subsets of one size are needed, and [setCartesian](https://calcul.io/function/setCartesian/index.md) for ordered cross-combinations.

## Growth caveat

A set of n members produces 2^n subsets, so output becomes enormous quickly. Check [setSize](https://calcul.io/function/setSize/index.md) first and deduplicate with [setDistinct](https://calcul.io/function/setDistinct/index.md). Avoid powerset for large inputs unless a constrained search is intended.

[All functions](https://calcul.io/functions/index.md)
