At MTG Salvation site I came across one topic in which a certain person wanted to come up with a formula for mana base and that started a series of thoughts in my head. I have a way of determining number of lands and what ratio. But I never asked anybody else about this. How do you do it? Here is a short post about how I do it .
I use a method that is approximative in a way but works fine for me (I was always good with numbers, if I make an extensive table with everything written in it, I can see what the ideal result is. I'm bad at calculating it though...). But on the other hand it probably would be accurate if I would use the right constants for some variables and would actually calculate it. The one variable that actually bothers me the most is a fetch land. I usually count fetchlands as producers of all the colored mana the fetched lands can produce. But that is wrong as it fetches only one part of it either - one or two colors. So that is why I started to include importance of having a certain color on a certain turn (and also started treating fetchlands 'correctly')
For each deck type I usually have a given number of lands in my head already. Blitz will play 18-19 lands, aggro deck will do fine with 20-21 lands, aggro-control with higher cmc will do fine with 23-24, control/combo about 26 and heavy control even 27-28. This is something I start with. But if I want some more precise numbers I usually go figure out how many successive land drops I need. For that I need to calculate my average converted mana cost and see. Then check the decklist and see what CMC the crucial spells are and when I need to play them. The percentage of drawing the last land on crucial turn should be somewhere near 75% but anything higher than 70 usually seems fine. This means that if a crucial spell for my control deck is turn 4 when I need to play a wrath effect I need enough land to have 4 consecutive land drops. If I would be playing Zoo I need to lands by t2 because I can operate on that just fine. It is crucial to have the second land though. If you want to calculate the probability of having certain amount of land cards by turn X use hypergeometric distribution for that.
Actual Mana Base
So what do I do to get a mana base done? I count the number of colored mana symbols first then count the number of colored cards and calculate the ratio of colored mana I need for the deck to have a basic idea how the mana base could look like. I assign importance to the cards - there is an ideal turn in which I want to cast the cards. Based on the importance when to play certain spell I write down modifiers for the colored sources. For example I want to be able to cast Kird Ape on turn 1 and Qasali Pridemage on turn 2. Kird Ape requires Red and Pridemage GW. I also change the mana cost of the cards to the one I actually need. Force of Will does cost 3UU but often you cast it for alternative cost not 3UU. Tribal Flames in my Zoo deck requires at least 4 or 5 different basic land types to be efficient. That is the reason why the mana cost in my table is marked as WURBG instead of just 1R. The same can be sad about other alternative costs - for example flashback cost. For example if you play a certain card only for its flashback cost what you count is the colored part of the flashback cost (for example Unburial Rites fetched by Gifts Ungiven) requires W. When doing this I also look at my sideboard because I also want to be able to cast my spells when I need them. Especially when many cards against Burn and RDW are white. This means that I also need to add some more importance to white.
After doing this for all relevant spells I add up the importance modifier (ranging from 1 - not important - to 3 - important) with the colored mana the spell requires and multiply all that by the number of cards. Then I take these values and divide them by the number of respective color cards exponent 0.5 (or square root). This will reveal the ratio of colored sources. From this point on I usually just consider some facts and make a list of lands I want to play. One needs to play with the deck a lot to find the ideal mana base but this is system helps me create a mana base that works pretty well. It's much of a guess work actually but assigning the importance to colors you need and number of lands on specific turn helps to make the mana base efficient. In the table I enter the number of how many times I want to play each land and check if the ratio check or not (divide the ratio so you have numbers similar to 1, you will be getting usually numbers like 10/8/12 for example instead of 31/25/40 - I just took some random numbers).
For example the factors that change the number of lands are - acceleration spells (ramp) like Birds of Paradise or Rampant Growth. Or it can be the number of cantrips in a deck. All these cards lower the number of lands you need to play usually in 4:1 ratio (one land per 4 cantrips).
The same way as I look at the importance of having the colors I need on turn X I also look when I need untapped lands. This is something many of us will subconsciously understand to some extent. Fast aggressive decks should not play CIPT lands since these will just make the deck lose tempo. Control decks though can have a certain amount of CIPT lands but not too many (four Colonnades is nice, but if you have other CIPT lands 4 might not be the right number). Especially if such a land can become win condition. The thing to consider though is this. If I want to play my Supreme Verdict on turn 4 I need White producing lands to come untapped. That is the reason why my Solar Flare wasn't really running too many Seachrome Coast but rather Glacial Fortress. I always needed blue so there wasn't a problem this land would come tapped in play. Seachrome Coast would come tapped always on turn 4. Since this deck also ran Liliana of the Veil and wanted to play it on turn 3 it needed black sources to come untapped (Darkslick Shores). For this same reason aggressive GR decks played 4 Copperline Gorge in addition to few shocklands. This allowed them to have their sources untapped during the crucial turns when they need access to both colors and the mana while saving life.
All this information will change certain type of land count and can shift the land count in general. At this time in Standard we have CIPT lands that are usually manlands and 2 types of land that can come into play untapped or tapped. The ratio between those is also crucial. Playing 8 CIPT lands is too much! But you can afford to play 5-6 for example. As for the actual land count. For example my Esper deck ran Nephalia's Drownyard as a possible win condition that in the end proved to be primary win condition. In order to run 4 of these lands and still be able to play my UU, BB and WW spells I needed to play more land in general - 28. It may have looked extreme but look at this card as a spell and one you need to invest mana each turn as well while still being able to play your other spells. Note that this deck also ran cantrips that also usually lower the land count in a deck (4/1 meaning that for 4 cantrips you can just cut a land)!
If the deck is multicolored I create a table. In it I write down each land in consideration and write down mana it can either fetch or produce. I multiply this number by the number of the land in the deck. I play with the numbers till I find the right numbers (that I got from the above). This part for me is usually more abstract and does not really use math much. But on the other hand everything can be somehow transformed into pure maths. This table makes me see if everything I considered corresponds with the mana base. If it there doesn't seem to be a solution it means there is a problem in deckbuilding and what I want to play is too risky. So I need to go back and revise my spells instead.
After all this I usually try to think a bit and see what problems I can encounter. Either be it Blood Moon entirely killing my dual lands or Wasteland/Strip Mine destroying just one but needed land (in terms of color). That's why I shift the numbers a bit as well. When my table shows that my deck needs only 1 mountain but the red spell is something I really want to play I put two instead of one (I'm talking here about fetchable source of a certain color, just an example). If Blood Moon would really hurt my deck (for example while playing Jund) I consider running basics. I put in the number I need to cast my most important spells. If I need to cast Liliana of the Veil I need two Swamps. I will need Forest as well, but I won't need Mountain since Blood Moon will provide me with many Mountains^_^.
So in short this is how I go about creating mana base for my decks. Mana base is crucial. Without having efficient mana base that allows you to play the spells you need and when you need to play them your deck will be much worse. It will either struggle on having too few land, too much land or lose tempo because of not having the right lands available. Even if you will copy mana base from someone else make sure to make approprite changes according to your deck's important turn, color requirements etc.
since the link to the original table is broken I will add here an example of BUG Control mana base for current Standard.