ForHosting KIT · Developer Utilities

Mayan numeral converter

The Mayan numeral converter turns a non-negative decimal integer into a clear base-twenty representation built from dots, bars, and the shell symbol for zero.

● BetaFree · in your browser
Use it from WebAPIEmailTelegramApp soon

Its result lists every positional row from the most significant power of twenty down to the units row, making the output suitable for teaching, checking handwritten work, or rendering a custom numeral. Each row includes its power, digit value, and symbolic components. Conversion is deterministic, private, and available in the browser, while automated API requests cost $0.002 each.

Read a Mayan numeral as a base-twenty number

Mayan numerals use positional notation, much as everyday decimal numbers do, but each position is worth twenty times the position below it. The bottom or least significant row represents units, the next represents groups of twenty, the next groups of four hundred, and so on. This converter returns those rows in the opposite presentation order used by many data formats: the most significant row comes first, and the units row comes last. That ordering makes the array straightforward to process from left to right while preserving the vertical relationship of the written numeral. Within one row, a dot represents one and a bar represents five. Values from one through nineteen combine zero to three bars with up to four dots. A value of zero uses the shell symbol, ensuring that an empty positional place remains visible. The returned power field states exactly which power of twenty a row occupies, while value gives the digit from zero through nineteen. Symbols supplies the pieces needed to draw or describe that digit without guessing how it was decomposed.

Choose and validate the decimal input

Provide one field named number containing a JSON integer that is zero or greater. Zero is valid and produces one row containing a shell; it does not produce an empty result. Negative values are rejected because this representation is defined here only for non-negative integers. Fractions, numeric text such as "429", missing values, infinities, and values beyond JavaScript's safe integer range are also rejected rather than rounded or silently reinterpreted. This strictness matters when a conversion will be graded, stored, or used to generate artwork: a value that merely looks numeric should never become a different numeral by accident. For a successful conversion, the result repeats the original number, identifies the base as twenty, and returns rows from greatest power to least. For example, a number requiring three base-twenty digits will have powers two, one, and zero in that order. Every row is present, including an internal zero digit, because removing a shell between two nonzero rows would change the value. API users can therefore validate the shape mechanically, and browser users can follow the same predictable rules when copying the symbols by hand.

Render, verify, and reuse the returned rows

To render the result in the traditional vertical style, place the first returned row at the top and continue downward in array order. In each nonzero row, draw the dots above the bars. The symbols array lists a combined dot token first when dots are needed, followed by one bar token for every group of five; a shell is the sole symbol for zero. The value field is useful for accessibility labels or debugging, while the power field lets you show place values beside an educational diagram. You can verify the conversion by multiplying each row value by twenty raised to its power and adding the products. That sum must equal the returned number. The algorithm uses only integer division and remainders, with no network access, randomness, clock, locale rules, or mutable state, so the same input always produces the same JSON. This makes it dependable for classroom worksheets, museum interactives, static-site build scripts, and design tools that need repeatable source data. The browser version is convenient for individual conversions, and the API price is $0.002 per request when the same operation is incorporated into an automated workflow.

Prepare a classroom example

Turn a decimal exercise value into explicit positional rows that students can draw and verify.

Render historical numeral artwork

Use the ordered dots, bars, and shells as deterministic source data for a visual layout.

Check a manual conversion

Compare handwritten base-twenty digits with the returned row values and powers.

What inputs are accepted?

The number field must contain a non-negative JSON integer within the safe integer range.

How is zero represented?

Zero returns one units row whose value is zero and whose symbols array contains shell.

Which row appears first?

Rows are returned from the highest power of twenty to power zero, so the most significant row is first.

Does this use the Long Count calendar adjustment?

No. It uses pure base twenty for numeral conversion and does not apply calendar-specific place values.

What does an API conversion cost?

Each API request costs $0.002; the browser tool can run the same deterministic conversion locally.

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/mayan-numeral

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/mayan-numeral \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"number":429}'
{
  "number": 429
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "math.mayan_numeral",
  "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.

Read the full KIT documentation →