---
title: "Power tower (tetration), a^^n"
method: POST
path: "/v1/power-tower"
tags: ["Calculators"]
---

# Power tower (tetration), a^^n

`POST /v1/power-tower`

## Request

- Base URL: `https://api.calculate.co.nz`
- URL: `https://api.calculate.co.nz/v1/power-tower`
- Auth: API key in header `X-API-Key`

Evaluate a power tower, repeated exponentiation.

A tower is evaluated RIGHT TO LEFT: a^^3 is a^(a^a), not (a^a)^a. Those are
different numbers, and the left-to-right reading is the usual mistake.
2^^4 is 65,536, not 256.

Towers overflow almost immediately. 3^^4 is 3^7625597484987, a number with
over three trillion digits, so the height is capped at 10 and anything too
large returns `value: null` with `is_finite: false` rather than a wrong
number or an error.

This endpoint has no MCP tool on purpose. Every other calculator here
encodes a New Zealand rule an assistant cannot derive; this is arithmetic a
model does correctly unaided, so a tool would cost tool-selection accuracy
for nothing.

## Request body

- PowerTowerRequest
  - `base` number, required: The number being raised.
  - `height` integer, required: How many times it appears in the tower. Capped at 10 because it overflows almost immediately.

## Response `200`

The tower's value, or a note saying it overflowed.

- PowerTowerResponse
  - `result` PowerTowerResultModel, required
    - `base` number, required: Base you sent.
    - `height` integer, required: Height you sent.
    - `value` number, nullable: The value, or null when the result is too large to represent.
    - `is_finite` boolean, required: False when the result overflowed.
    - `expression` string, required: The tower written out.
    - `note` string, required: How it was evaluated, or why there is no value.
  - `disclaimer` string, required: Scope and limits of this calculation.

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/calculate/apis/calculate-co-nz-api.md) · [All operations](https://skmtc.dev/calculate/apis/calculate-co-nz-api/llms.txt) · [OpenAPI document](https://skmtc.dev/calculate/apis/calculate-co-nz-api/revisions/aa59a8e76614?raw)
