# SEQUENCE in Google Sheets: syntax and examples

URL: https://goingstellar.ro/reference/sheets/sequence/

SEQUENCE fills a block of cells with numbers that grow by a fixed step, from one formula in the top-left cell. Rows and columns set the size, start sets the first number, and step the gap. Pair it with ARRAYFORMULA to build dates, labels or row numbers.

## Syntax

```
SEQUENCE(rows, columns, start, step)
```

## Arguments

- `rows` (number, required: yes): How many rows to return.
- `columns` (number, required: no): How many columns. Default is 1.
- `start` (number, required: no): The first number. Default is 1.
- `step` (number, required: no): The increase between numbers. Default is 1. Can be negative.

## Examples

The examples use this table, starting in A1:

| n |
|---|
| 1 |

```
=SEQUENCE(5)
```

Result: 

| 1 |
|---|
| 2 |
| 3 |
| 4 |
| 5 |

Five numbers in a column. Run in a Google Sheet (English US locale) on 2026-11-29.

```
=SEQUENCE(2, 3)
```

Result: 

| 1 | 2 | 3 |
|---|---|---|
| 4 | 5 | 6 |

A grid of 2 rows and 3 columns, filled left to right. Run in a Google Sheet (English US locale) on 2026-11-29.

```
=SEQUENCE(3, 1, 10, 5)
```

Result: 

| 10 |
|---|
| 15 |
| 20 |

Start at 10 and add 5 each time. Run in a Google Sheet (English US locale) on 2026-11-29.

```
=SEQUENCE(1, 4, 100, -25)
```

Result: 

| 100 | 75 | 50 | 25 |
|---|---|---|---|


One row counting down: a negative step. Run in a Google Sheet (English US locale) on 2026-11-29.

```
=ARRAYFORMULA(SEQUENCE(3)^2)
```

Result: 

| 1 |
|---|
| 4 |
| 9 |

Use the sequence in a calculation: the first three squares. Run in a Google Sheet (English US locale) on 2026-11-29.

## Common errors

- rows and columns must be at least 1. SEQUENCE(0) and SEQUENCE(-1) return #NUM!.
- Inside a calculation, wrap it in ARRAYFORMULA. SEQUENCE(3)+1 on its own shows only the first value, 2.
- Every size argument must be a number. Text such as "a" returns #VALUE!.
- Numbers fill row by row, left to right. For a column-first order, swap the sizes and use TRANSPOSE.

## Compared with Excel

Same syntax and argument order as Excel SEQUENCE.

## Questions and answers

### How do I number the rows of a table with SEQUENCE?

Use =SEQUENCE(ROWS(A2:A10)). The size follows the data, so the numbers stay in step when the table changes.

## Related functions

- [ROW](https://goingstellar.ro/reference/sheets/row/)
- [ARRAYFORMULA](https://goingstellar.ro/reference/sheets/arrayformula/)
- [TRANSPOSE](https://goingstellar.ro/reference/sheets/transpose/)
- [FILTER](https://goingstellar.ro/reference/sheets/filter/)
- [UNIQUE](https://goingstellar.ro/reference/sheets/unique/)

## Sources

- [SEQUENCE (Docs Editors Help)](https://support.google.com/docs/answer/9368244)

