What is casting a Mai Hoa hexagram from time?
Mai Hoa Dịch Số is an applied branch of the Zhou Yi, associated with the name of Shao Kangjie of the Song dynasty, casting a hexagram from numbers or from an observed omen and then reading it through the relation between Thể (the subject) and Dụng (the object). When casting from time, one turns a point of lunar year, month, day, and hour into four numbers, then uses division with remainder to pick the trigrams and the moving line. This differs fundamentally from the six-coin toss of Lục Hào: coin tossing can yield a static hexagram or several moving lines, whereas a time-cast hexagram always has exactly one moving line, and the moving line here serves mainly to distinguish which side is Thể and which is Dụng.

According to discussion on the Lý số Việt Nam forum, some have taken a time-cast hexagram and read it by the Lục Hào method, finding that it mostly did not verify, concluding that two different methods of obtaining a hexagram require two different ways of reading, and cannot substitute for each other.
Why must the year be converted into an earthly branch number?
Mai Hoa does not use the solar year number but the twelve-branch cycle. Tý is 1, Sửu 2, Dần 3, Mão 4, Thìn 5, Tị 6, Ngọ 7, Mùi 8, Thân 9, Dậu 10, Tuất 11, Hợi 12. A Tý year is 1, a Hợi year is 12, and after one cycle it returns. This is the most easily confused point for beginners, since the habit is to take the birth year or the solar year number. Mai Hoa takes the branch of the lunar year, not 2024 or 2025.
Table converting the Tiên Thiên numbers to trigrams
After obtaining the remainder from division by 8, match it to a trigram in the order of the Tiên Thiên Bát Quái:
| Remainder | Trigram | Five phases | Image |
|---|---|---|---|
| 1 | Càn | Kim | Heaven |
| 2 | Đoài | Kim | Marsh |
| 3 | Ly | Hỏa | Fire |
| 4 | Chấn | Mộc | Thunder |
| 5 | Tốn | Mộc | Wind |
| 6 | Khảm | Thủy | Water |
| 7 | Cấn | Thổ | Mountain |
| 8 | Khôn | Thổ | Earth |
This five-phase table must be memorized before reading Thể and Dụng, because Càn and Đoài are both Kim, Chấn and Tốn both Mộc, Cấn and Khôn both Thổ, and one mistake throws off the whole chain of generation and overcoming that follows.
Table of hour branch numbers
The hours of the day are also numbered by the twelve branches, each branch spanning two clock hours. The Tý hour begins at 23:00 the previous night and runs to 01:00 the next morning. This matters when looking up the hour for a specific point, because 23:00 already belongs to Tý of the following day under the can-chi reckoning.
| Hour branch | Clock hours | Number |
|---|---|---|
| Tý | 23:00 to 01:00 | 1 |
| Sửu | 01:00 to 03:00 | 2 |
| Dần | 03:00 to 05:00 | 3 |
| Mão | 05:00 to 07:00 | 4 |
| Thìn | 07:00 to 09:00 | 5 |
| Tị | 09:00 to 11:00 | 6 |
| Ngọ | 11:00 to 13:00 | 7 |
| Mùi | 13:00 to 15:00 | 8 |
| Thân | 15:00 to 17:00 | 9 |
| Dậu | 17:00 to 19:00 | 10 |
| Tuất | 19:00 to 21:00 | 11 |
| Hợi | 21:00 to 23:00 | 12 |
What is the formula for casting a Mai Hoa hexagram from time?
The formula has three divisions, and this is the entire computational part of the method:
- Upper trigram = (year number + month number + day number) divided by 8, take the remainder.
- Lower trigram = (year number + month number + day number + hour number) divided by 8, take the remainder.
- Moving line = (year number + month number + day number + hour number) divided by 6, take the remainder.
The convention when the remainder is 0 is where many stumble. For division by 8, a remainder of 0 is taken as 8, that is the Khôn trigram. For division by 6, a remainder of 0 is taken as 6, that is the moving line at the sixth line, the top line. The reason is that remainder division in this system always returns a value from 1 to the divisor, never 0, so 0 must be understood as the divisor. Anyone used to programming will see that ordinary modulo returns 0, and that is precisely the source of the miscalculation error.
It must be clearly distinguished: the upper trigram is the three-line trigram above, the lower trigram is the three-line trigram below, and together they form one of the 64 hexagrams. The upper trigram is also called the outer trigram, the lower trigram the inner trigram. Some materials say Mai Hoa determines the outer trigram first and then the inner trigram, which matches the order of the formula above.
A fully worked example for a specific day and hour
Take a point to run the whole calculation chain: the 15th day of the 8th lunar month in the year Giáp Thìn, at the Thìn hour (roughly 07:00 to 09:00 in the morning).
Step one, conversion:
- Year Giáp Thìn: Thìn is the 5th branch, so the year number = 5.
- 8th lunar month: month number = 8.
- Day 15: day number = 15.
- Thìn hour: Thìn is the 5th branch, so the hour number = 5.
Step two, calculate the upper trigram: 5 + 8 + 15 = 28. Dividing 28 by 8 gives 3 with remainder 4. Remainder 4 corresponds to the Chấn trigram. So the upper trigram is Chấn.
Step three, calculate the lower trigram: 5 + 8 + 15 + 5 = 33. Dividing 33 by 8 gives 4 with remainder 1. Remainder 1 corresponds to the Càn trigram. So the lower trigram is Càn.
Combining upper trigram Chấn above and lower trigram Càn below gives the primary hexagram Lôi Thiên Đại Tráng.
Step four, calculate the moving line: again taking the total 33 divided by 6 gives 5 with remainder 3. So the moving line is the third line, counting from the bottom up.
Step five, determine Thể and Dụng. The lower trigram Càn contains the third moving line, so Càn is Dụng, representing the matter asked about. The upper trigram Chấn does not contain the moving line, so Chấn is Thể, representing the querent. Càn is Kim, Chấn is Mộc. Dụng Càn Kim overcomes Thể Chấn Mộc, and by the Thể-Dụng relation table this is the configuration of Dụng overcoming Thể, unfavorable to the querent. It must be said at once that this is a reading by the five-phase convention of Mai Hoa, not an absolute auspicious or inauspicious verdict for a person's life.
Step six, build the mutual hexagram. The mutual hexagram takes lines 2, 3, 4 as its lower trigram and lines 3, 4, 5 as its upper trigram of the primary hexagram. The primary hexagram Lôi Thiên Đại Tráng has six lines from the bottom up: line 1 yang, line 2 yang, line 3 yang, line 4 yang, line 5 yin, line 6 yin. Taking lines 2, 3, 4 as yang, yang, yang gives lower trigram Càn. Taking lines 3, 4, 5 as yang, yang, yin gives upper trigram Đoài. So the mutual hexagram is Trạch Thiên Quải. The mutual hexagram describes the inner development, the submerged part of the situation.
Step seven, build the changed hexagram. The third moving line of the primary hexagram is yang, change it to yin, the other lines stay as they are. The six new lines from the bottom up become: yang, yang, yin, yang, yin, yin. The new lower trigram is Đoài (yang, yang, yin), the upper trigram is still Chấn. So the changed hexagram is Lôi Trạch Quy Muội. The changed hexagram indicates the direction afterward, once the moving line has shifted.
In sum this example gives: primary hexagram Lôi Thiên Đại Tráng, mutual hexagram Trạch Thiên Quải, changed hexagram Lôi Trạch Quy Muội, Thể is Chấn Mộc, Dụng is Càn Kim, moving line the third. When reading, Mai Hoa examines generation and overcoming between Thể and Dụng, then extends to the relations among the hexagrams across the whole set of primary, mutual, and changed, not just one pair.
Is the site's daily-hexagram tool authentic Mai Hoa?
No. The site's daily-hexagram tool uses a function that casts by day, and this function has no hour parameter. Because the hour is missing it must substitute a private convention: it uses the branch of the day in the role of the hour in the formula. In other words, where the hour number should be, the tool takes the branch number of the day. This is a variant whose clear purpose is to produce one hexagram per day for quick reference, not the authentic Mai Hoa method of year, month, day, and hour. Users should know they are viewing a hexagram by day, not a hexagram by the moment of asking. To cast properly by the Mai Hoa time method, all four numbers are needed, including the hour.
Points where books and schools still differ
This is the most important part for the self-learner, because there are three points with no single answer.

Is the year taken by branch or by year number?
The common way is to take the ordinal of the year's earthly branch, Tý 1 through Hợi 12. But there is also a way of taking the year number by another counting system, or taking the solar year number reduced. Whichever is chosen will give different upper and lower trigrams right from the first step. This article follows the convention of taking the earthly-branch ordinal, because that is the way most commonly presented in introductory Mai Hoa materials.
How are leap months counted?
Leap months are a point of dispute. One way takes the month number as it is by the lunar calendar, that is a leap month still carries that month's number. One way adds one, treating the leap month as the following month. Another way assigns the leap month to the previous or following month depending on the solar term. No convention is accepted by all books, so when casting in a leap month the student should state clearly which way is being used so the reader knows how to compare.
Does the year change at Tết or at Lập Xuân?
This is a difference between schools. The folk reckoning changes the year at the first day of Tết Nguyên Đán. The reckoning by solar terms, often seen in fate calculation and in many Yi materials, changes the year at the Lập Xuân term, roughly the start of February in the solar calendar. These two markers differ by a few days to a few weeks. For a day falling between Tết and Lập Xuân, whichever marker is chosen will change both the year number and the month number, and therefore change the hexagram. The caster should state clearly which marker is being followed.
Do Thể and Dụng always follow the moving line?
The general rule is that the trigram containing the moving line is Dụng, the other trigram is Thể. But some books discuss special cases, such as when the hexagram is all moving, or when the mutual and changed hexagrams are also weighed in. This extended way of reading is not consistent across materials, so beginners should first master the basic rule.
May Mai Hoa reading be mixed with Lục Hào?
According to scholarly discussion on the Lý số Việt Nam forum, Mai Hoa and Lục Hào differ in both how the hexagram is obtained and how it is read. Mai Hoa rests on generation and overcoming between Thể, Dụng, mutual hexagram, and changed hexagram, along with observing images and reasoning by situation. Lục Hào rests on the five-phase generation and overcoming among the Thế line, Ứng line, dụng thần, changed line, and the day and month. Mixing the two ways usually gives inconsistent results, because each assumes a different way of obtaining the hexagram.
What is a time-cast Mai Hoa hexagram used for?
In the common presentation, a Mai Hoa hexagram answers for a specific situation at a point in time, unlike Tử Vi or Bát Tự, which rely on the birth date and hour to examine a whole life. Thus the same person asking two different questions at two different times will get two different hexagrams. This is not a flaw of the method but a consequence of taking the moment of asking as input. The hexagram is a frame of reference for looking at a problem from several angles, not a fixed sentence. Introductory materials often stress that the value lies in contemplating and reflecting on the hexagram's meaning, not in treating it as an absolute prophecy. This way of reading also matches the general spirit of the Kinh Dịch: the hexagram describes tendencies and the times, while the decision still belongs to the querent.
Summary of the steps to cast a hexagram yourself
- Determine the lunar time point, stating clearly whether Tết or Lập Xuân is the marker.
- Convert the year to its branch number, Tý 1 through Hợi 12.
- Take the lunar month and day numbers, handle leap months by a chosen convention and record it.
- Convert the hour to its branch number, remembering the Tý hour begins at 23:00 the previous day.
- Compute the three totals, divide by 8 for the upper trigram, by 8 for the lower trigram, by 6 for the moving line, with remainder 0 read as 8 or 6.
- Combine the hexagram, determine Thể and Dụng by the moving line, build the mutual and changed hexagrams.
- Read the five-phase generation and overcoming between Thể and Dụng, then extend to the whole set of primary, mutual, and changed.
Following these seven steps correctly, any time point yields a complete hexagram, with mutual hexagram, changed hexagram, and the Thể-Dụng part for reading.
