Cci Calculator
Calculate the Commodity Channel Index for identifying cyclical trends and extreme price levels.
Calculator
Adjust values & calculateMulti-Period CCI
CCI History
Formula
Where TP = (High + Low + Close) / 3, SMA(TP) is the Simple Moving Average of Typical Prices over N periods, and Mean Deviation is the average of absolute differences between each TP and the SMA. The 0.015 constant normalizes readings so ~75% fall between -100 and +100.
Last reviewed: December 2025
Worked Examples
Example 1: CCI Calculation Example
Example 2: CCI Trend Signal
Background & Theory
The CCI Calculator applies the following established principles and formulas. Foreign exchange markets facilitate the conversion of one currency into another and serve as the largest and most liquid financial markets in the world, with daily turnover exceeding seven trillion US dollars. Exchange rates are quoted as currency pairs, expressing the price of one unit of a base currency in terms of a quote currency. For example, a EUR/USD rate of 1.0850 means one euro buys 1.0850 US dollars. The smallest standardized price movement in most pairs is the pip, typically the fourth decimal place, with a value of 0.0001 per unit for USD-denominated pairs. The bid price is the rate at which a dealer will buy the base currency, while the ask price is the rate at which it will sell. The spread between bid and ask represents the dealer's compensation and varies with liquidity and volatility. Leverage amplifies both gains and losses by allowing traders to control positions larger than their deposited margin. A 100:1 leverage ratio means a one-percent adverse move eliminates the entire margin, making position sizing and risk management critical. Two parity conditions from international economics anchor exchange rate theory. Purchasing Power Parity (PPP) holds that exchange rates should adjust over time so that identical goods trade at equivalent prices across countries: S = P_d / P_f, where S is the spot rate and P_d and P_f are domestic and foreign price levels. PPP performs well over long horizons but poorly in the short run due to trade barriers, non-tradable goods, and capital flows. Covered Interest Rate Parity (CIRP) is a near-arbitrage condition stating that forward exchange rate premiums or discounts exactly offset interest rate differentials between two currencies: F/S = (1 + r_d) / (1 + r_f). Deviations from CIRP create riskless arbitrage opportunities that traders rapidly eliminate. Uncovered Interest Rate Parity posits that high-yielding currencies should depreciate to offset their interest advantage, though empirical evidence is mixed and the carry trade — borrowing in low-rate currencies to invest in high-rate ones — has generated persistent returns.
History
The history behind the CCI Calculator traces back through the following developments. For much of the nineteenth century and early twentieth century, the international monetary system operated under the classical gold standard, under which each participating currency was fixed to a defined weight of gold, making bilateral exchange rates effectively constant. The system provided price stability and facilitated global trade but constrained governments' ability to respond to economic downturns. World War One shattered the gold standard as nations suspended convertibility to finance wartime expenditures. The interwar period saw attempts to restore gold convertibility, most notably the British return to the gold standard in 1925 at the pre-war parity, a decision criticized by John Maynard Keynes as deflationary. The Great Depression forced widespread currency devaluations and the effective collapse of the international gold standard by the early 1930s. The Bretton Woods Conference of July 1944 established a new order in which member currencies were pegged to the US dollar, while the dollar alone was convertible into gold at 35 dollars per troy ounce. The International Monetary Fund and World Bank were created at the same conference to oversee the system. Bretton Woods delivered exchange rate stability during the postwar growth era but came under strain as US deficits and European dollar accumulation outpaced American gold reserves. On August 15, 1971, President Nixon announced the suspension of dollar-gold convertibility — the so-called Nixon Shock — effectively ending the Bretton Woods system. By 1973, major currencies had transitioned to floating exchange rates determined by market supply and demand, a regime that has persisted. On September 16, 1992, hedge fund manager George Soros shorted the British pound against the European Exchange Rate Mechanism constraints, forcing the UK's withdrawal in what became known as Black Wednesday. Electronic trading platforms emerged in the 1990s and 2000s, replacing voice-brokered interbank markets and dramatically reducing transaction costs for institutional and retail participants alike.
Frequently Asked Questions
Formula
CCI = (TP - SMA(TP)) / (0.015 x Mean Deviation)
Where TP = (High + Low + Close) / 3, SMA(TP) is the Simple Moving Average of Typical Prices over N periods, and Mean Deviation is the average of absolute differences between each TP and the SMA. The 0.015 constant normalizes readings so ~75% fall between -100 and +100.
Worked Examples
Example 1: CCI Calculation Example
Problem: For a 20-period CCI, the current Typical Price is 157.67, the 20-period SMA of TP is 155.50, and the Mean Deviation is 2.80. Calculate CCI.
Solution: CCI = (Typical Price - SMA of TP) / (0.015 x Mean Deviation)\nCCI = (157.67 - 155.50) / (0.015 x 2.80)\nCCI = 2.17 / 0.042\nCCI = 51.67\nInterpretation: CCI at 51.67 is between 0 and +100\nThis indicates bullish momentum but not yet at extreme levels\nPrice is above average but within normal range
Result: CCI = 51.67 | Bullish Momentum | Price above average but within normal +/-100 range
Example 2: CCI Trend Signal
Problem: CCI crosses above +100 from 95 to 115. The 50-period moving average is sloping upward. The previous CCI reading was 95. Evaluate the signal.
Solution: CCI crossing above +100 = New uptrend initiation signal\nMoving average sloping up = Confirms bullish trend\nCCI moved from 95 to 115 = Momentum accelerating\nLambert strategy: Enter long when CCI crosses +100\nExit when CCI falls back below +100\nStop loss: Below recent swing low or at -100 CCI level\nConfirmation: Volume should expand on the breakout
Result: Strong Buy Signal | CCI above +100 with trending MA | New uptrend beginning
Frequently Asked Questions
What is the Commodity Channel Index (CCI) and what does it measure?
The Commodity Channel Index (CCI) is a versatile momentum oscillator developed by Donald Lambert in 1980 that measures the deviation of the current typical price from its average over a specified period. Despite its name, CCI works on any financial instrument including stocks, forex, and cryptocurrencies, not just commodities. The indicator oscillates around a zero line, with readings above +100 traditionally indicating an overbought condition or the start of a new uptrend, and readings below -100 indicating an oversold condition or the start of a new downtrend. CCI is unique because approximately 75 percent of readings fall between +100 and -100, making moves beyond these levels statistically significant.
How is the CCI formula calculated step by step?
The CCI calculation involves four steps. First, calculate the Typical Price (TP) for each period as (High + Low + Close) / 3. Second, calculate the Simple Moving Average (SMA) of the Typical Prices over the lookback period (typically 20). Third, calculate the Mean Deviation by finding the average of the absolute differences between each Typical Price and the SMA. Fourth, apply the CCI formula: CCI = (Current TP - SMA of TP) / (0.015 x Mean Deviation). The constant 0.015 was chosen by Lambert to ensure that approximately 70 to 80 percent of CCI values fall between -100 and +100 when the price follows a normal distribution. This normalization makes it easy to identify unusual price movements.
What do CCI readings above +100 and below -100 signify?
CCI readings above +100 indicate that the typical price is significantly above its average, suggesting strong bullish momentum that could signal the beginning of a new uptrend. This is not simply an overbought signal, as in strongly trending markets, CCI can remain above +100 for extended periods. Readings below -100 indicate that the typical price is well below its average, suggesting strong bearish momentum or the start of a downtrend. Lambert originally designed the indicator to identify new trends when CCI crossed above +100 or below -100. The zero line crossing also provides signals, with crosses above zero suggesting bullish momentum is gaining and below zero indicating bearish momentum. Extremely high or low readings may also precede reversals.
What is the best period setting for CCI?
The standard CCI period is 20, which was the default recommended by its creator Donald Lambert. This setting works well for daily charts in most markets, capturing approximately one month of trading data. Shorter periods like 10 or 14 make CCI more responsive to price changes, generating more frequent signals that are useful for short-term trading and scalping. However, shorter periods also produce more false signals and noise. Longer periods like 40 or 50 create smoother CCI readings suitable for swing trading and position trading, with fewer but higher quality signals. For intraday trading, 14 or 20 periods on 15-minute or hourly charts provide a good balance. Many traders use multiple CCI periods simultaneously for confirmation, such as a 14-period CCI for timing and a 50-period CCI for trend direction.
How do you trade CCI divergences?
CCI divergences are powerful reversal signals that occur when price and CCI move in opposite directions. Bullish divergence happens when price makes a lower low while CCI makes a higher low, indicating that selling momentum is weakening despite lower prices. This often occurs near the end of downtrends and suggests a reversal to the upside. Bearish divergence occurs when price makes a higher high but CCI makes a lower high, suggesting that buying momentum is fading even as price reaches new highs. For best results, divergences should form when CCI is in or near extreme territory (above +100 or below -100). Confirm divergence signals with a price action trigger such as a reversal candle pattern, a trendline break, or a support/resistance level. Multiple divergence peaks or troughs increase the reliability of the signal.
How does the 0.015 constant in the CCI formula work?
The constant 0.015 in the CCI formula is a scaling factor that Lambert specifically chose to normalize the indicator readings so that approximately 70 to 80 percent of CCI values fall between -100 and +100 under normal market conditions. Without this constant, the raw ratio of price deviation to mean deviation would produce values that are difficult to interpret consistently across different instruments with varying price levels and volatilities. The constant ensures that readings beyond the plus or minus 100 threshold are statistically unusual, representing price movements that deviate significantly from the norm. This normalization makes it possible to compare CCI readings across different markets, timeframes, and price levels using the same overbought and oversold thresholds of plus 100 and minus 100.
References
Reviewed by Daniel Agrici, Founder & Lead Developer · Editorial policy