ForHosting KIT · Math

Surface area calculator

Get the total surface area of a cube, sphere, cylinder or cone from its dimensions: a cube with a side of 2 covers 24 square units, six faces of 4 each. For a cone you give the height, not the slant. 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
Shape
Cube
Side
2
You get
Surface area
24

Total surface area is the sum of every outer face of a solid, measured in square units of the same length you send. This surface area calculator accepts a shape name — cube, sphere, cylinder, or cone — together with the dimensions that uniquely determine that solid, and returns the closed-form total surface area. A cube needs one positive edge length; a sphere needs one positive radius; a cylinder and a cone each need a positive radius and a positive perpendicular height. The cone formula uses the slant height derived from those two lengths, so you never have to compute the hypotenuse yourself.

Which solid you send and which closed form is used

The identity is six times the square of that edge, because a cube has six congruent square faces. Send shape equal to sphere together with a positive radius. The identity is four pi r squared, the unique smooth surface that encloses a ball of that radius.

Send shape equal to cylinder together with a positive radius and a positive perpendicular height. The total surface is two pi r times the quantity r plus h, which is the lateral rectangle of width two pi r and height h plus the two circular bases. Send shape equal to cone together with a positive radius and a positive perpendicular height.

The engine first forms the slant height l as the hypotenuse of r and h, then returns pi r times the quantity r plus l, which is the unrolled sector plus the circular base. That is the whole contract: one shape name, the dimensions that define it, and one total surface area in square units of the same length you sent.

If you need only the lateral area of a cylinder or cone, or the volume of any of these solids, use a dedicated tool; the search intent here is total surface area from a shape name and its dimensions, with a clear number or an honest error when a dimension is not positive.

Where a multi-shape surface area lookup earns its keep

Students meet these four identities in the same unit of solid geometry: six a squared, four pi r squared, two pi r times r plus h, and pi r times r plus l. A single calculator that dispatches on the shape name lets a learner check every item on a mixed worksheet without opening four different pages or flipping the lateral-versus-total distinction by hand.

Teachers can pre-generate answer keys that refuse zero or negative dimensions instead of printing NaN, and exam platforms can mark a mixed surface-area section with one deterministic oracle. Packaging, paint, and sheet-metal estimates often start from the same four solids: a cubic carton, a spherical tank, a closed drum, or a conical hopper. Knowing that a requested radius is not positive is as valuable as the number itself when a downstream cutting list would otherwise go to the shop floor.

Remember the contract limits: this tool does not size a frustum, a pyramid, a torus, or an open cylinder, and it does not convert units. If every length is in centimeters, surface area is in square centimeters.

Homework and exam surface-area drills

Check total surface area for mixed cube, sphere, cylinder, and cone items, and verify that zero or negative dimensions are rejected instead of returning NaN.

Packaging, paint, and sheet-metal estimates

Size the outer wrap of a cubic carton, spherical tank, closed drum, or conical hopper from the same shape-plus-dimensions contract.

Which dimensions does each shape need?

Cube needs a positive side (edge length). Sphere needs a positive radius. Cylinder and cone each need a positive radius and a positive perpendicular height. The cone slant height is derived as √(r²+h²).

What happens if a dimension is zero or negative?

Surface area is not defined for a non-positive length, and failed validation is not billed.

How is the surface area of a cylinder calculated?

It is 2πr times r plus h. The curved wall unrolls into a rectangle 2πr wide and h tall, and the two circular lids add the rest, so a closed cylinder is covered completely.

Do I need the slant height to get a cone's surface area?

No. Enter the radius and the perpendicular height, and the calculator finds the slant height as the hypotenuse of those two. It then adds the unrolled side to the circular base, πr times r plus the slant height.

Does it give the lateral area or the total surface area?

Always the total: every face of the cube, the whole sphere, and the curved side plus the bases of a cylinder or cone. If you only need the lateral area, or the volume, use a dedicated calculator.

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/surface-area

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/surface-area \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"shape":"cube"}'
{
  "shape": "cube"
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "math.surface_area",
  "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.

Any missing, zero, negative, or non-finite dimension fails with invalid_input and is not billed.

Which solid you send and which closed form is used

Total surface area is the measure of the entire outer skin of a solid: every face of a cube, the sphere that wraps a ball, the curved wall plus both circular lids of a closed cylinder, and the lateral sector plus the circular base of a closed cone. This endpoint is a single dispatcher for those four classroom solids. Send shape equal to cube together with a positive edge length in the field side (aliases edge and a).

Input contract, required dimensions, and error behaviour

A cube requires side (or edge, or a). A sphere requires radius (or r). A cylinder and a cone each require radius and height (or h). Every dimension that the chosen shape needs must be finite and strictly greater than zero. Missing shape, an unknown shape name, or a missing required dimension fail the same way. POST a JSON body with a required shape field whose canonical values are cube, sphere, cylinder, and cone. The form paints those four as a select; the engine also accepts a few aliases such as box, ball, right_cylinder, and right_cone after trimming, lowercasing, and folding spaces or hyphens to underscores. Dimensions arrive as JSON numbers or numeric strings. Zero is not a solid of that family, a negative length is not a geometric measure, and Infinity or NaN cannot produce a finite area, so those cases fail with invalid_input and name the failing field before any formula runs. On success the body echoes the canonical shape, echoes the validated dimensions that were used, and returns surface_area together with a short formula string: A equals 6 a squared for a cube, A equals 4 pi r squared for a sphere, A equals 2 pi r times r plus h for a cylinder, and A equals pi r times r plus l for a cone. The cone path also reports the derived slant_height so you can check the Pythagorean step; that field is omitted for the other three solids.

Where a multi-shape surface area lookup earns its keep

On this page the work runs entirely in your browser; through the API each successful lookup costs $0.002, failed validation is not charged, and nothing is stored after the response returns. Whether you arrived searching for a surface area calculator or for the total wrap of a cube, sphere, cylinder, or cone, the contract is the same: shape plus positive dimensions in, one finite total surface area or a clear invalid_input out.

Deterministic geometry fixtures

Generate reproducible total surface areas for unit tests, contest validators, and CI assertions without hand-rolling 6a², 4πr², 2πr(r+h), or πr(r+l).

How do I compute the surface area of a cube, sphere, cylinder, or cone?

Send shape plus the dimensions that define that solid: side for a cube; radius for a sphere; radius and height for a cylinder or cone. The API returns the total (closed) surface area and the formula that was used.

Does this return lateral area or total surface area?

Total surface area of the closed solid: six faces of the cube, the full sphere, cylinder wall plus both bases, and cone sector plus the circular base. It does not return lateral-only area.

What does the surface area calculator cost?

The browser tool is free. API requests use prepaid KIT balance at $0.002 per successful call; invalid input is not billed.

Read the full KIT documentation →