ForHosting KIT · Math

Square pyramid calculator

Enter the base side and height of a square pyramid and get its volume, slant height, lateral area and total surface at once: a side of 4 and a height of 3 give a volume of 16 and a surface of 44.84441. Free in your browser.

  • Free
  • Runs in your browser
  • No sign-up
  • Your data stays on your device
Use it from WebAPIEmailTelegramApp soon
If you enter
Side
4
Height
3
Decimal places
6
You get
Slant
3.605551
Volume
16
Lateral area
28.84441
Surface area
44.84441

Volume and surface of square pyramid from side and height. Search intent: square pyramid volume. No network calls or random seeds are required. Failed jobs are not billed.

Five measurements from two numbers

A square pyramid is fixed by the side of its base and its vertical height, the distance from the centre of the base straight up to the tip. Everything else follows from those two numbers. The slant height, measured up the middle of each triangular face, comes from the right triangle formed by the height and half the base side. The volume is the side squared times the height, divided by three. The lateral area adds up the four faces, and the total surface adds the base as well. With a side of 4 and a height of 3 you get a slant height of 3.605551, a volume of 16, a lateral area of 28.84441 and a surface area of 44.84441.

The usual mix-ups

The first is taking the slant height for the vertical height. The vertical height runs straight through the inside of the pyramid, while the slant height climbs the middle of a face. Neither one is the edge that runs from a corner to the tip. The second is using the total surface when the base will not be covered, which is exactly when the lateral area is the figure you need. Keep the side and the height in the same unit, and the areas come out in that unit squared and the volume in that unit cubed. Entries are checked before any arithmetic, and if you set the number of decimals the result is rounded only once.

Teaching

Pinned goldens.

How do I find the volume of a square pyramid?

Multiply the base side by itself, multiply by the height and divide by three. A base side of 4 and a height of 3 give a volume of 16, exactly a third of a box with the same base and height.

How is the slant height of a face worked out?

Half the base side, the vertical height and the slant height form a right triangle, so Pythagoras gives the slant height. With a side of 4 and a height of 3 it comes out at 3.605551.

What is the difference between lateral area and surface area?

Lateral area covers only the four triangular faces, while surface area adds the square base. For a side of 4 and a height of 3 that is 28.84441 for the faces and 44.84441 in total.

Can I enter the slant height instead of the vertical height?

Yes. If you measured the slant height of a face rather than the vertical height, enter it with the base side. The calculator works back to the height through the same right triangle and then finishes the rest.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/math/square-pyramid

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.

curl -X POST https://api.kit.forhosting.com/math/square-pyramid \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"side":4,"height":3}'
{
  "side": 4,
  "height": 3
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "math.square_pyramid",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

The calculator is free in the browser, deterministic, and identical on the API path. Inputs are validated before arithmetic so invalid payloads fail with invalid_input. Half-up rounding is applied once from raw IEEE values when decimals are requested. Use the same JSON from spreadsheets, CMS, automation, or teaching demos.

How it works

Volume and surface of square pyramid from side and height. V=a²h/3; face slant related by Pythagoras. No network calls or random seeds are required. Failed jobs are not billed. No network calls or random seeds are required. Failed jobs are not billed. The calculator is free in the browser, deterministic, and identical on the API path. Inputs are validated before arithmetic so invalid payloads fail with invalid_input. Half-up rounding is applied once from raw IEEE values when decimals are requested. Use the same JSON from spreadsheets, CMS, automation, or teaching demos. The calculator is free in the browser, deterministic, and identical on the API path. Inputs are validated before arithmetic so invalid payloads fail with invalid_input. Half-up rounding is applied once from raw IEEE values when decimals are requested. Use the same JSON from spreadsheets, CMS, automation, or teaching demos.

Inputs, limits and rounding

Optional decimals use half-up once. Outputs echo inputs. No network calls or random seeds are required. Failed jobs are not billed. No network calls or random seeds are required. Failed jobs are not billed. Provide required JSON fields. Invalid types raise invalid_input. The calculator is free in the browser, deterministic, and identical on the API path. Inputs are validated before arithmetic so invalid payloads fail with invalid_input. Half-up rounding is applied once from raw IEEE values when decimals are requested. Use the same JSON from spreadsheets, CMS, automation, or teaching demos. The calculator is free in the browser, deterministic, and identical on the API path. Inputs are validated before arithmetic so invalid payloads fail with invalid_input. Half-up rounding is applied once from raw IEEE values when decimals are requested. Use the same JSON from spreadsheets, CMS, automation, or teaching demos.

When to use it

Use when search intent matches. Volume and surface of square pyramid from side and height. No network calls or random seeds are required. Failed jobs are not billed. No network calls or random seeds are required. Failed jobs are not billed. The calculator is free in the browser, deterministic, and identical on the API path. Inputs are validated before arithmetic so invalid payloads fail with invalid_input. Half-up rounding is applied once from raw IEEE values when decimals are requested. Use the same JSON from spreadsheets, CMS, automation, or teaching demos. The calculator is free in the browser, deterministic, and identical on the API path. Inputs are validated before arithmetic so invalid payloads fail with invalid_input. Half-up rounding is applied once from raw IEEE values when decimals are requested. Use the same JSON from spreadsheets, CMS, automation, or teaching demos.

Quick check

Free widget.

Automation

Same JSON via API.

Free?

Yes tier A.

Network?

No.

Bad input?

invalid_input.

API?

Yes.

Locales?

EN-only; Nitro hydrates.

Read the full KIT documentation →