Analytic Hierarchy Process (AHP) Calculator

Stephanie Ben-Joseph headshot Stephanie Ben-Joseph

Introduction to the Analytic Hierarchy Process and Pairwise Comparison

The Analytic Hierarchy Process (AHP) is a method for turning a set of side-by-side judgements into a set of numeric priority weights. It was developed by mathematician Thomas L. Saaty in the 1970s, and its central insight is that people are far better at comparing two things than at assigning absolute scores to many things at once. Instead of asking “how important is cost, on a scale of 0 to 100?”, AHP asks “between cost and quality, which matters more here, and by how much?” Every answer is stored in a square reciprocal comparison matrix, and the priority weights are extracted from that matrix as its principal eigenvector.

This page runs the criteria-weighting step of AHP for 3, 4, or 5 criteria. You fill the upper triangle of the comparison matrix on Saaty's 1–9 scale, and the calculator returns priority weights that sum to 1, the principal eigenvalue λmax, the consistency index CI, the random index RI for that matrix size, and the consistency ratio CR. It also names the specific triple of criteria that is doing the most damage to your consistency, because inconsistency in AHP is never a property of one cell on its own.

The distinguishing feature of AHP compared with simply typing weights into a spreadsheet is that the arithmetic can talk back. If you claim that cost beats quality by 5, quality beats reliability by 3, and reliability beats cost by 2, no set of weights on earth can honour all three statements at once. AHP measures exactly how badly those statements conflict and gives you a single number, the consistency ratio, that tells you whether the conflict is small enough to ignore. That auditability is why AHP appears in procurement scoring, in site-selection studies, in engineering trade studies and in public-sector investment appraisal, where a decision has to survive being questioned months later.

How to Use the AHP Priority and Consistency Calculator

  1. Choose the matrix size. Pick 3, 4, or 5 criteria. The number of judgements you must make is n(n−1)/2, so a 3-criteria model needs 3 comparisons, a 4-criteria model needs 6, and a 5-criteria model needs 10.
  2. Name your criteria. Short, unambiguous labels work best: Cost, Quality, Reliability, Responsiveness. If two people on the team read a label differently, the matrix will record their disagreement as inconsistency.
  3. Fill the upper triangle using Saaty's scale. A value of 4 in the “Cost / Quality” cell means cost is judged four times as important as quality for this decision.
  4. Let the tool mirror the reciprocals. Entering 4 above the diagonal writes 0.25 below it. The diagonal is locked at 1, since every criterion is exactly as important as itself.
  5. Press “Compute priorities.” You get the eigenvector weights, a geometric-mean cross-check, the row products Aw, the ratios that reveal λmax, and the full CI / RI / CR chain.
  6. Read the consistency verdict. If the ratio is above the limit for your matrix size, the calculator names the worst triple of criteria and the value that would make it consistent. Change that one judgement first and recompute.

A practical tip for group settings: collect one matrix per stakeholder, compute each separately, and then discuss only the comparisons where people disagreed most. Averaging judgements before discussing them hides the real argument. AHP theory suggests combining separate judgements with the geometric mean rather than the arithmetic mean, precisely because the entries are ratios and the geometric mean is the operation that preserves reciprocity.

Saaty's Fundamental 1–9 Scale (What the Numbers Mean)

Enter values between 1/9 (about 0.111) and 9. Values above 1 mean the row criterion is preferred to the column criterion; values below 1 mean the column criterion is preferred. The scale is deliberately coarse. Saaty argued that people can reliably hold about seven items in mind when making a comparative judgement, so a nine-point scale is roughly the finest resolution that human judgement actually supports. Pretending to distinguish a preference of 5.3 from one of 5.4 adds precision that the underlying judgement does not have.

Saaty's fundamental scale for pairwise comparisons.
Value Meaning Practical interpretation
1Equal importanceYou would be comfortable treating the two criteria as equally influential.
3Moderate importanceOne criterion is preferred, but the other still matters a lot.
5Strong importanceYou would usually choose the preferred criterion when tradeoffs arise.
7Very strong importanceThe preferred criterion dominates in most realistic scenarios.
9Extreme importanceOnly rare exceptions would make you prioritise the other criterion.
2, 4, 6, 8Intermediate valuesUse when your judgement sits between two verbal statements.
1/3, 1/5, 1/7, 1/9Opposite preferenceSame strengths, but favouring the column criterion instead of the row.

The AHP Priority Formula, Consistency Index and Consistency Ratio

Let A be the n×n comparison matrix whose entry aij says how many times more important criterion i is than criterion j. AHP requires the matrix to be positive and reciprocal:

Formula: a_ji = 1 / a_ij, a_ii = 1, a_ij > 0

aji = 1aij , aii = 1 , aij > 0

A matrix is perfectly consistent when every chain of comparisons multiplies out. For all i, j and k:

Formula: a_ik = a_ij ⁢ a_jk

aik = aij ajk

When that holds exactly, A has rank 1 and a single non-zero eigenvalue equal to n. Saaty's priority vector w is the principal right eigenvector of A, normalised so its entries sum to 1:

Formula: A ⁢ w = λ_max ⁢ w, ∑ i = 1 n w_i = 1

Aw = λmax w , i=1n wi = 1

This calculator computes that eigenvector the way Saaty describes it, as the limit of the normalised row sums of increasing powers of the matrix. The Perron–Frobenius theorem guarantees that a positive matrix has exactly one such vector with all-positive entries, so the iteration converges:

Formula: w = lim k → ∞ (A^k ⁢ e) / (e^T ⁢ A^k ⁢ e)

w = limk Ake eTAke

The results table also shows the row geometric mean weights, the estimator proposed by Crawford and Williams and known as the logarithmic least-squares method. It is a genuinely different calculation, not a rounding of the eigenvector, and it is the shortcut most spreadsheets use:

Formula: w_i^GM = (∏j=1na_ij)^1/n / (∑ k = 1 n (∏j=1na_kj)^1/n)

wiGM = (j=1naij) 1/n k=1n (j=1nakj) 1/n

A third method exists and is best avoided: normalising each column so it sums to 1 and then averaging the rows. That is only an approximation to the eigenvector, it has no theoretical justification beyond convenience, and it is the method that turns up in many spreadsheet templates. This page does not use it. Because the exact eigenvector is available, the principal eigenvalue can be read straight off the row ratios, all of which are identical when w is the true eigenvector:

Formula: λ_max = 1 / n ∑ i = 1 n (A⁢w)_i / w_i

λmax = 1n i=1n (Aw)i wi

Saaty proved that λmaxn for any positive reciprocal matrix, with equality only under perfect consistency. The gap between the two is therefore a natural measure of inconsistency, and dividing it by n−1 keeps the measure comparable across matrix sizes. That is the consistency index:

Formula: C I = (λ_max − n) / (n − 1)

CI = λmaxn n1

A raw CI is hard to read, because larger matrices drift naturally: it is simply harder to stay coherent across 10 judgements than across 3. Saaty's fix was to divide CI by the average CI of a large sample of randomly filled reciprocal matrices of the same size, the random index (RI). The result is the consistency ratio:

Formula: C R = (C I) / (R I) ≤ 0.10

CR = CIRI 0.10

CR is effectively “how inconsistent are you, as a fraction of how inconsistent random nonsense would be?” A CR of 0.05 means your judgements carry about 5% of the incoherence of a matrix filled at random. Saaty's headline rule is CR of 0.10 or less, with tighter limits of 0.05 for n = 3 and 0.08 for n = 4, because a small matrix offers fewer judgements over which a single mistake can be averaged out. The calculator reports both the size-specific limit and the general 0.10 rule.

Random Index Values for n = 1 to 10, Verified by Simulation

The RI table is the part of AHP most often transcribed incorrectly, so the values below were re-derived rather than copied. Saaty's published table comes from averaging CI over samples of randomly generated reciprocal matrices whose entries are drawn from the 17-value scale 1/9, 1/8, … 1, … 8, 9. Repeating that experiment here with 20,000 to 50,000 matrices per size reproduces the published figures closely, and the two places where the modern large-sample values differ noticeably (n = 3 and n = 7) match the corrected values published by Alonso and Lamata in 2006 from 100,000 matrices per size.

Random Index (RI): Saaty's published table versus a large-sample simulation.
Matrix size n RI (Saaty, published) RI (simulation, this page) Notes
10.000.00No comparison exists; CR is undefined.
20.000.00Always perfectly consistent; CR is undefined.
30.580.528Largest discrepancy in the table; use 0.58 with the 0.05 limit.
40.900.879Used by this calculator for 4 criteria.
51.121.108Used by this calculator for 5 criteria.
61.241.250Agreement to within 0.01.
71.321.341Second-largest discrepancy; the simulated value is higher.
81.411.406Agreement to within 0.005.
91.451.451Agreement to within 0.001.
101.491.487Agreement to within 0.003.

Two practical conclusions. First, the classic table is sound: for the sizes this page supports, the published and simulated values differ by at most 0.05, and the effect on CR for a 4×4 matrix is under 3% of the reported value. Second, the acceptability thresholds were calibrated against the published table, so the page uses RI = 0.58, 0.90 and 1.12 for n = 3, 4 and 5 rather than the simulated figures. Mixing a modern RI with a threshold calibrated to the old one would quietly move the goalposts. If you see a page quoting RI = 0.52 for n = 3 or RI = 1.35 for n = 7, it is using the Alonso and Lamata revision, not an error.

Worked Example: Four Supplier Criteria with Cost Dominant

Take a supplier decision weighted on Cost, Quality, Reliability and Responsiveness — the matrix this page loads by default. The team's six judgements are: Cost is moderately above Quality (3), strongly above Reliability (5), and very strongly above Responsiveness (7); Quality is slightly above Reliability (2) and strongly above Responsiveness (4); and Reliability is moderately above Responsiveness (3). The reciprocals fill in the lower triangle automatically.

Worked example: eigenvector priorities and the consistency chain for the default 4×4 matrix.
Criterion Eigenvector weight Geometric-mean weight (Aw)i (Aw)i / wi
Cost0.57810.57682.35134.0674
Quality0.22820.23030.92844.0674
Reliability0.13360.13340.54354.0674
Responsiveness0.06000.05950.24424.0674

Every ratio in the last column is the same number, 4.0674, which is the signature of a true eigenvector: the matrix scales w by a single factor. That factor is λmax. From it, CI = (4.0674 − 4) / 3 = 0.0225, and with RI = 0.90 for a 4×4 matrix, CR = 0.0225 / 0.90 = 0.0250, or 2.5%. That is comfortably inside both the 0.08 limit for n = 4 and the general 0.10 rule, so the weights can be used: cost carries 57.8% of the decision, quality 22.8%, reliability 13.4% and responsiveness 6.0%.

Notice how close the geometric-mean column is to the eigenvector column — the largest gap is 0.002. That is what you should expect from a near-consistent matrix, and a wide gap between the two estimators is itself a warning sign. Notice also where the small inconsistency lives. Cost beats Reliability by 5 and Reliability beats Responsiveness by 3, which implies Cost should beat Responsiveness by 15; the team entered 7. That triple has a logarithmic deviation of 0.76, the largest in the matrix, and it is exactly the judgement the calculator names when consistency slips. Halving the disagreement by raising that cell towards 9 would drop CR further.

Interpreting Weights, lambda-max, CI and CR

  • Weights. Use them as multipliers when scoring alternatives. A weight of 0.40 means that criterion carries 40% of the decision emphasis. Weights always sum to 1 by construction, so they are shares, not scores.
  • Close weights. If two weights sit within a couple of percentage points of each other, treat them as tied. The 1–9 scale simply does not resolve differences that fine.
  • lambda-max. For a perfectly consistent n×n matrix it equals n exactly. The amount by which it exceeds n is the raw inconsistency signal.
  • CI. The excess of lambda-max over n, spread over n−1 degrees of freedom. Useful mainly as the input to CR.
  • CR. The one number to report. Below the limit, the matrix is coherent enough to use; above it, at least one judgement needs revisiting.
  • The worst triple. More actionable than CR itself, because it tells you which of your statements to reopen rather than telling you to start again.

Troubleshooting a High Consistency Ratio

A CR above the limit does not mean AHP failed. It means the set of statements you made cannot all be true at the same time. The following workflow fixes most cases:

  1. Start with the named triple. The calculator reports the triple with the largest logarithmic deviation and the value that would make it consistent. Move the entered value part of the way towards the implied value and recompute.
  2. Soften your most extreme judgement. Entries of 7, 8 and 9 constrain the rest of the matrix severely. Pulling a 9 back to 7 often halves CR.
  3. Check for a preference cycle. If A beats B and B beats C, then A must beat C. A matrix that says otherwise cannot be repaired by small edits.
  4. Tighten ambiguous criteria. A label like “quality” that quietly mixes durability, appearance and compliance produces judgements that shift between comparisons. Split it or define it.
  5. Remove overlapping criteria. If “total cost” and “purchase price” both appear, every comparison involving them double-counts the same concern, and the matrix becomes unstable.
  6. Run a sensitivity check. Change one entry by a single scale step and watch the weights. If the ranking flips, the decision is genuinely marginal and needs evidence rather than more judgements.

One thing not to do: nudging values purely to force CR below 0.10. Consistency is a diagnostic, not a target. A matrix massaged into consistency records what the arithmetic wanted rather than what the team believes, which is worse than an honest matrix with a CR of 0.12 and a footnote explaining why.

Common Use Cases for Small AHP Models

Three to five criteria is the sweet spot for a single working session. Above about seven, the number of comparisons grows quadratically and judgement fatigue sets in, which is itself a common cause of inconsistency. Typical applications include:

  • Supplier and vendor selection: balancing cost, quality, lead time, reliability and support.
  • Product roadmap prioritisation: comparing customer impact, engineering effort, revenue potential and risk.
  • Site or facility selection: weighting land cost, access, workforce availability and planning risk.
  • Project portfolio triage: strategic alignment against return, feasibility and urgency.
  • Public investment appraisal: equity, cost, effectiveness and speed of implementation, where the audit trail matters as much as the answer.
  • Hiring panels: experience, technical depth, communication and collaboration, with criteria defined in advance to reduce bias.

If you have more than five criteria, the AHP-native answer is to build a hierarchy rather than a longer list: group related criteria under two or three parent criteria, weight the parents against each other, weight the children within each parent, and multiply down the tree. This page computes one level of that hierarchy at a time, which is all a single matrix ever does.

Limitations and Assumptions Behind These Numbers

  • Three to five criteria only. The RI values built into this page cover n = 3, 4 and 5. Larger matrices need the full RI table in the section above.
  • Judgements are subjective. A low CR says your statements agree with each other, not that they are right. Garbage in, coherent garbage out.
  • The 1–9 scale is bounded. If one criterion genuinely matters 40 times more than another, the scale cannot say so, and the resulting weights understate the gap.
  • Weights are only half a decision. You still need to score each alternative on each criterion and combine the scores with these weights.
  • Rank reversal is possible. Adding or removing an alternative later can change the ranking under the distributive synthesis mode. This is a known and much-debated property of AHP, not a bug in the arithmetic.
  • The RI table assumes a particular random model. RI values come from matrices filled uniformly from the 17-point scale. A different sampling assumption yields slightly different RI values, which is why several tables circulate.
  • Reciprocals are displayed rounded. Mirrored cells show four decimals, but the computation uses exact reciprocals of the upper-triangle values, so no rounding error leaks into the weights.
  • Context expires. Preferences shift with budgets, deadlines and regulation. Re-run the matrix when the situation changes rather than reusing last year's weights.

Frequently Asked Questions About AHP Weights and Consistency

Does this calculator use the true principal eigenvector or an approximation?

It uses the true principal right eigenvector. The matrix is raised to successive powers by normalised power iteration until the priority vector stops moving by more than 1e-12, which is exactly the limit Saaty defines. The cruder normalised-column-average shortcut is not used. The row geometric mean is also shown beside it as a cross-check, because it is a different estimator and agreeing answers are evidence that the matrix is well behaved.

What consistency ratio counts as acceptable in AHP?

Saaty's general rule is a consistency ratio of 0.10 or less. He also gives tighter limits for small matrices: 0.05 for a 3 by 3 matrix and 0.08 for a 4 by 4 matrix, because a small matrix has fewer judgements to average the error out. This calculator reports the ratio against both the size-specific limit and the general 0.10 rule.

What are the Random Index values used for CR?

Saaty's published table for n = 1 to 10 is 0.00, 0.00, 0.58, 0.90, 1.12, 1.24, 1.32, 1.41, 1.45 and 1.49. Those are average consistency indices for large samples of randomly filled reciprocal matrices. This page uses 0.58, 0.90 and 1.12 for the three matrix sizes it supports.

What numbers should I type into the comparison matrix?

Type values from 1/9 (about 0.111) up to 9. A value above 1 means the row criterion is more important than the column criterion, and a value below 1 means the column criterion wins. The diagonal is locked at 1, and the mirrored cell is filled in for you with the exact reciprocal.

Why does the calculator point at three criteria at once when consistency is poor?

Inconsistency in AHP lives in triples, not in single cells. If A is judged 5 times B and B is judged 3 times C, then perfect consistency requires A to be 15 times C. The calculator scans every triple, measures how far the entered value sits from the implied value on a logarithmic scale, and names the worst offender so you know which judgement to revisit first.

Does a low consistency ratio mean the decision is correct?

No. A low consistency ratio only says your judgements hang together arithmetically. You can be perfectly consistent about criteria that are badly defined, overlapping or simply wrong for the decision. Consistency is a hygiene check on the matrix, not evidence that the criteria or the weights are the right ones.

Sources and Further Reading

The formulas, the 1–9 scale, the CI definition, the RI table and the 0.10 threshold on this page were checked against Saaty's own publications. The simulated RI column was generated independently for this page using 20,000 to 50,000 random reciprocal matrices per size.

  • Saaty, T. L. (1977). “A scaling method for priorities in hierarchical structures.” Journal of Mathematical Psychology, 15(3), 234–281. The original derivation of the eigenvector method and the consistency index. doi:10.1016/0022-2496(77)90033-5
  • Saaty, T. L. (1980). The Analytic Hierarchy Process: Planning, Priority Setting, Resource Allocation. McGraw-Hill, New York. Source of the published Random Index table and the CR guidance.
  • Saaty, T. L. (1987). “The analytic hierarchy process — what it is and how it is used.” Mathematical Modelling, 9(3–5), 161–176. doi:10.1016/0270-0255(87)90473-8
  • Saaty, T. L. (1990). “How to make a decision: the analytic hierarchy process.” European Journal of Operational Research, 48(1), 9–26. doi:10.1016/0377-2217(90)90057-I
  • Saaty, T. L. (2008). “Decision making with the analytic hierarchy process.” International Journal of Services Sciences, 1(1), 83–98. States the 0.10 rule together with the 0.05 and 0.08 limits for 3×3 and 4×4 matrices. doi:10.1504/IJSSCI.2008.017590
  • Alonso, J. A., and Lamata, M. T. (2006). “Consistency in the analytic hierarchy process: a new approach.” International Journal of Uncertainty, Fuzziness and Knowledge-Based Systems, 14(4), 445–459. Recomputes RI from 100,000 matrices per size. doi:10.1142/S0218488506004114
  • Crawford, G., and Williams, C. (1985). “A note on the analysis of subjective judgment matrices.” Journal of Mathematical Psychology, 29(4), 387–405. The logarithmic least-squares (row geometric mean) estimator shown as a cross-check. doi:10.1016/0022-2496(85)90002-1
  • International Journal of the Analytic Hierarchy Process — open-access journal for current AHP applications and methodological debate.

Next Steps: Turning Weights into a Ranking of Alternatives

This calculator produces criterion weights. To finish a multi-criteria decision, score each alternative against each criterion and combine the scores with these weights, typically as a weighted sum: for each alternative, total the products of weight and score. The alternative with the highest total is the best match to the preferences you recorded. In full AHP, those scores are themselves derived from pairwise comparison matrices, one per criterion, which is why the method scales into a hierarchy.

Keep the scoring scale consistent, for example 0 to 10 where 10 is best. If a criterion is “lower is better”, such as cost or lead time, convert it into a higher-is-better score before combining. Finally, run a sensitivity check: raise the top weight by five to ten percentage points and see whether the ranking holds. If it flips easily, the decision is close and deserves better data rather than more precise weights. Use the Copy summary button to paste the weights, lambda-max, CI and CR into a decision memo so the reasoning is recorded alongside the answer.

AHP inputs

Enter values from 1/9 (about 0.111) to 9. Values above 1 favour the row criterion; values below 1 favour the column criterion. The diagonal is locked at 1 and mirrored cells fill themselves in.

Pairwise comparison matrix using Saaty's fundamental scale.
Criteria Criterion 1 Criterion 2 Criterion 3 Criterion 4
Criterion 1
Criterion 2
Criterion 3
Criterion 4

Entering a value updates the mirrored cell with its exact reciprocal, so the matrix always stays reciprocal.

Fill in the matrix to generate priority weights and consistency checks.

Calculator notes will appear here after you compute.

Consistency Challenge: the AHP pairwise-comparison mini-game

Each round drops you into a real decision with three to five criteria. Slide the judgement bar between two criterion cards to say which one matters more and by how much on Saaty's 1–9 scale, then commit it. The consistency-ratio gauge eases towards its new value after every judgement and turns red past CR = 0.10. Clear the board with a coherent matrix in as few revisions as you can.

Score 0 Round Judged CR Best 0

Keyboard (focus the board first): and set the strength of preference, and move to the previous or next pair, Space or Enter commits the judgement. Pointer or touch: drag the handle along the judgement bar and release to commit, or tap a pair chip to jump to it.

Press Start game to begin. Score rewards a coherent matrix (CR at or below 0.10) finished quickly and with few revisions.

Embed this calculator

Copy and paste the HTML below to add the AHP Calculator: Pairwise Priority Weights and Consistency Ratio to your website.