Skip to content

Main content

Sexagenary Cycle Step Calculator

Advance a valid sexagenary pair by signed whole cycle steps, preserving stem/branch parity and the one-based ordinal.

Loading tool…

Description

Find their shared position in the 60-step cycle, add steps modulo 60, and return ordinal and indexes.

Gan-Zhi combines a ten-stem sequence with a twelve-branch sequence into a sixty-position traditional cycle. Cycle indexes, calendar dates and local clock labels are distinct inputs; the correct calendar assignment must be established separately.

Find their shared position in the 60-step cycle, add steps modulo 60, and return ordinal and indexes.

When to use this tool

Use Sexagenary Cycle Step Calculator when you need an explicit traditional cycle-index mapping or step calculation.

How to use the tool and how it works

  1. Enter stemIndex, branchIndex, steps. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. Read result. Expand result to inspect the returned fields.

Require bounded stem/branch indexes of equal parity and integer steps within ±1000000. Find their shared position in the 60-step cycle, add steps modulo 60, and return ordinal and indexes.1

Compatible stem/branch positions advance together around the sixty-step cycle. This is an index operation rather than calendar conversion.2

Input fieldMeaning and unitsAccepted input
stemIndexZero-based stem order: Jia, Yi, Bing, Ding, Wu, Ji, Geng, Xin, Ren, Gui.Required. Safe integer.
branchIndexZero-based branch order: Zi, Chou, Yin, Mao, Chen, Si, Wu, Wei, Shen, You, Xu, Hai.Required. Safe integer.
stepsStepsRequired. Safe integer.
Output fieldInterpretationReturned shape
resultObject containing the calculated members; expand to inspect the fields below.Required. Object.
result.ordinalOne-based position in the Jia-Zi-first 60-step cycle.Calculated result member: number.
result.stemIndexZero-based stem order: Jia, Yi, Bing, Ding, Wu, Ji, Geng, Xin, Ren, Gui.Calculated result member: number.
result.branchIndexZero-based branch order: Zi, Chou, Yin, Mao, Chen, Si, Wu, Wei, Shen, You, Xu, Hai.Calculated result member: number.
json
{
  "input": {
    "stemIndex": 0,
    "branchIndex": 0,
    "steps": -1
  },
  "output": {
    "result": {
      "ordinal": 60,
      "stemIndex": 9,
      "branchIndex": 11
    }
  }
}

Limitations and assumptions

  • Mismatched parity is rejected because no cycle position represents it. Steps may be negative; the operation does not advance a real calendar date.
  • Outputs are nested inside result. Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
  • Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.

Alternative or Complementary methods

Consult the intended calendrical convention when deriving labels from dates. Keep local time, day boundaries and solar-term rules explicit rather than treating an index calculator as a calendar or predictive model.

References

  1. Calculation and input contract: ganzhi/cycle-stepper — tool.io

  2. Heavenly Stems and Earthly Branches — Hong Kong Observatory

Similar or alternative tools