Qimen Dunjia (奇门遁甲), also written Qi Men Dun Jia, is a classical Chinese divination and decision-making system, one of the "Three Arts of the Mystical Gates" (三式), that casts a 3×3 nine-palace chart of the moment a question is asked and reads the conditions around that specific matter; the grid itself is often called a Qimen chart.

Quick Facts
Also writtenQi Men Dun Jia, 奇门遁甲
ClassificationOne of the "Three Arts" (三式), alongside Taiyi (太乙) and Liuren (六壬)
Documented sinceAt least the Warring States period (475–221 BCE); legend attributes it to the Yellow Emperor
Structure3×3 nine palaces (Luoshu magic square), four layers: doors, stars, deities, stems
RhythmA new chart every two hours; anchored to the moment of the question
Used forSpecific decisions: career, business, relationships, health timing, feng shui directions

Origins: A 4,000-Year-Old Military Secret

Qimen Dunjia (奇门遁甲) is one of the "Three Arts of the Mystical Gates" (三式), a trio of ancient Chinese systems, alongside Taiyi (太乙) and Liuren (六壬), used by military strategists, emperors, and advisors for over four millennia. The name itself is the skeleton of the system: Qi (奇) refers to the qi-yi (奇仪) — the ten heavenly stems less Jia, which hides — the remaining nine as three nobles (乙丙丁) and six escorts (戊己庚辛壬癸); Men (门) refers to the stars and doors that give the palaces their charge; and Dun Jia (遁甲) is the hidden thread running through the whole chart — Jia (甲), the commander, never appears directly, yet drives its every turn. The three are interlocking; remove any one and the chart stops working.

Legend attributes its creation to the Yellow Emperor (黄帝) during his war against Chi You. The sage Jiutian Xuannü descended from heaven to teach him this system, enabling him to gain strategic advantage and ultimately unify the tribes. While the historical accuracy of this myth is debatable, Qimen Dunjia's documented use stretches back to at least the Warring States period (475 to 221 BCE).

For most of its history the system was a closely guarded state secret, taught within the court and the army rather than the marketplace. The military classics bear this out: treatises such as the Wubei Zhi (《武备志》) and the Hu Qian Jing (《虎钤经》) devote substantial chapters to Qimen. The strategists most associated with it in the popular imagination, Zhuge Liang (诸葛亮) of the Three Kingdoms and Liu Bowen (刘伯温) of the early Ming, were prized precisely for reading terrain, timing, and the disposition of forces, which is exactly what a Qimen chart lays out. Only in later centuries did the art migrate from campaign tents into civilian hands, where the same framework, the same doors, stars, and stems, came to be applied to trade, travel, health, and personal choices.

"A general who does not know astronomy, geography, yin and yang, Qimen Dunjia, battle diagrams and troop dispositions is a mediocrity."

Zhuge Liang, in Romance of the Three Kingdoms

Tradition attaches the same roster of names to the art across the dynasties: Jiang Ziya, who counseled King Wen of Zhou; Zhang Liang, who helped found the Han; Li Jing of the early Tang; Liu Bowen and Yao Guangxiao of the Ming. Their craft served the founding of dynasties, and emperors returned the interest — Kangxi studied Qimen himself, and imperially commissioned editions such as the Yuding Qimen Baojian (《御定奇门宝鉴》) survive. That is how Qimen earned its enduring epithet: the "emperor's art" (帝王之术).

Key Insight

Qimen Dunjia was originally a military strategy tool, not a fortune-telling system. Its modern application to personal decision-making is a natural evolution: the same principles that guided generals now guide entrepreneurs, job seekers, and anyone facing a crossroads.

Deep diveOrigins & History of Qimen Dunjia →

The Nine Palaces: The Cosmic Grid

At the heart of every Qimen chart sits a 3×3 grid representing the nine palaces. Each palace corresponds to a trigram from the I Ching, a compass direction, a natural element, and a family member. Palace 5, the center, is the "commander's seat," the axis around which all energy revolves.

The numbers are not placed at random. They follow the Luoshu (洛书), the ancient magic square in which every row, every column, and both diagonals add up to fifteen. That balance is the whole point: the grid is a model of a cosmos held in equilibrium, and every symbol later dropped onto it is read against that stable frame. Because each palace also carries a fixed element, water in the north, fire in the south, wood in the east, metal in the west, the relationships between palaces are governed by the five-element cycles of generation and control, which is where much of a reading's logic comes from.

4☴ 巽SE
9☲ 离S
2☷ 坤SW
3☳ 震E
5C
7☱ 兑W
8☶ 艮NE
1☵ 坎N
6☰ 乾NW
The nine palaces arranged in the Luoshu (洛书) magic square pattern.

The palaces are not static. In each two-hour period, the elements within them shift: doors rotate, stars move, deities reassign. This constant motion is what makes Qimen a time-sensitive system: the same question asked at different times will produce different charts and therefore different guidance.

Deep diveWhy Every Qimen Chart Is a Magic Square →

Four Layers: Reading a Qimen Chart

Each palace in a Qimen chart contains four layers of information, stacked like geological strata:

Heaven Plate (天盘) · Nine Stars: Represents "timing": the objective conditions, natural forces, and fortune levels at play. Stars like Doctor (Doctor Star) and Advisor (Advisor Star) are auspicious; Bandit (Bandit Star) and Problem (Illness Star) warn of danger.

Earth Plate (地盘) · Stems & Branches: The foundation: fixed reference points that define the chart's baseline conditions.

Human Plate (人盘) · Eight Doors: Represents "human harmony": your actions, psychology, and interpersonal dynamics. Open Door brings opportunity; Death Door signals endings.

Spirit Plate (神盘) · Eight Deities: Represents "divine assistance": invisible forces and environmental energy. Leader (值符) commands authority; Serpent warns of deception.

The four plates of a single palace: stars set the conditions, stems define the baseline, doors set your action, deities tilt the odds.

Reading a chart is not about scanning all nine palaces at once. The practitioner first decides which palace represents the matter, the "use-god" (用神): the day stem usually stands for you, the hour stem for the thing you're asking about, and other symbols stand in for a spouse, a rival, money, or an illness. You find that palace, read its four layers together, and weigh them against the palaces it generates or is controlled by. A single palace can hold an auspicious door and an inauspicious star at once, so judgment comes from the whole stack, not any one line.

"In urgency, follow the Spirit;
when there is time, follow the Door."

Song of the Mist-Wave Fisherman (烟波钓叟歌)

Deep diveHow to Read a Qimen Chart, Step by Step → · What Is Yong Shen →

Lucky or Unlucky? How Doors, Stars & Deities Get Their Meaning

Unlike Western horoscopes, Qimen doesn't deal in simple "good day / bad day" predictions. Each element exists on a spectrum of seasonal strength (旺相休囚死): the same star can be thriving, supported, resting, trapped, or dead depending on the season and the palace it lands in. A star that's auspicious in autumn might be trapped in spring. Season and situation decide.

The system classifies doors, stars, and deities into three tiers: Auspicious (吉), Neutral (平), and Inauspicious (凶). But even an inauspicious element has its use. Injury Door (Injury Door) is terrible for new beginnings but excellent for debt collection. The art is in knowing when and how to harness each energy.

On top of these base meanings sit two further layers a reader always checks. Formations (格局) arise when particular stems and stars combine, some famously lucky, some famously dangerous, and they can override a palace's surface reading. And a handful of special markers, such as the Four Harms (door pressure, punishment clash, entombment, and void) and the Horse Star, quietly rewrite what a palace is saying: a strong-looking palace sitting in void may be hollow, while a stuck one carrying the Horse Star may be about to move.

Deep diveWhich Doors & Stars Are Lucky → · The Four Harms → · Void & Horse Star →

What Can You Ask Qimen? Career, Money, Love, Health

Today, Qimen Dunjia is used across East Asia for:

What ties these together is a shape, not a topic. Qimen is strongest on a specific decision at a specific time, "should I take this offer this week," not "who am I" or "what is my life purpose." Those identity questions belong to a birth-chart system like BaZi; a moment-based chart like Qimen answers what to do about the situation in front of you. The sharper and more specific the question, the sharper the reading, which is why learning to frame a good question is half the skill.

The challenge has always been accessibility. Calculating a Qimen chart by hand requires deep knowledge of the Chinese calendar, stem-branch cycles, and complex rotation rules. Closing that gap is exactly what QimenIt was built for.

Deep diveHow to Ask a Good Question → · Qimen vs BaZi → · Qimen for Career Decisions →

Your First Reading: Ask a Question, Get a Chart

QimenIt uses precise astronomical calculations and AI-powered interpretation to make Qimen Dunjia accessible to everyone, whether you're a seasoned practitioner or a complete beginner. Choose a question category and focus, enter your location and the time, and the system generates a complete chart with clear, actionable guidance.

Behind that simple form runs the same chain a master would work through by hand. Your clock time and location are converted to true solar time, since the chart is anchored to the real position of the sun, not the timezone on your phone. From that moment the engine derives the solar term, the bureau (局), and the arrangement of doors, stars, deities, and stems across the nine palaces, then reads the palace that stands for your question. Because the chart is fixed by the moment, the same question asked at the same time always yields the same chart, what changes is who, or what, reads it.

Try It Now

Ready to see what Qimen says about your current situation? Get your first reading free, no account required.

Cast a Free Chart →

Deep diveTrue Solar Time → · How Charts Are Built → · How AI Reads a Chart →

Frequently Asked Questions

What is Qimen Dunjia in one sentence?

Qimen Dunjia (奇门遁甲) is a classical Chinese divination and decision-making system, one of the Three Arts of the Mystical Gates (三式), that casts a nine-palace chart of the moment a question is asked and reads the conditions around that specific matter.

Is Qimen Dunjia the same as fortune-telling?

No. Qimen Dunjia was originally a military strategy tool used by generals and advisors, not a fortune-telling system. Its modern use is decision support: the same principles that guided generals now guide entrepreneurs, job seekers, and anyone facing a crossroads.

What can you ask a Qimen chart?

Career decisions, business strategy, relationship guidance, health timing, and feng shui directions. Qimen is strongest on a specific decision at a specific time — "should I take this offer this week" — rather than identity questions like "who am I", which belong to a birth-chart system such as BaZi.

How is a Qimen chart structured?

A Qimen chart is a 3×3 grid of nine palaces arranged on the Luoshu magic square. Each palace stacks four layers of information: the Nine Stars (heaven plate), the Eight Doors (human plate), the Eight Deities (spirit plate), and the heavenly stems (earth plate).

Why does the chart change every two hours?

Qimen is a time-sensitive system. In each two-hour period the doors rotate, the stars move, and the deities reassign, so the same question asked at different times produces different charts and therefore different guidance.