Actually, dimensional analysis isn't a tool for calculating; rather, it helps you show if a formula you're using won't work. What it shows is whether one expression uses the same units of measurement (called dimensions) as another expression.
For example: suppose we're asked to calculate how long it takes to fill a tank of water, given the rate at which water enters the tank and the volume of the tank, which starts out empty.
We want to find the time, t, measured in seconds. We're given the volume of water coming into the tank in gallons per second, or gal/sec.
Here's the dimensional analysis: we want to find t, the number of seconds, and we're given the flow rate in gallons/sec. These are the units of measurement which are called "dimensions".
We can do algebra with these dimensions just as we can with numeric values. We write the beginning of a formula:
seconds = gallons/second * -- what do we write next to make both sides equivalent?
We have to rewrite our trial formula:
seconds (time to fill the tank) =
seconds/gallon (reciprocal of flow rate) * gallons (tank volume)
Look at the units of measurement (dimensions) in the formula and ignore for the moment what's being measured. We have
seconds = seconds/gallon * gallons
seconds = seconds * (gallons / gallons)
Algebraically, the gallons cancel out, leaving us with
seconds = seconds
which at least shows us our formula is self-consistent.
So we have, finally, t = tank volume / flow rate
Now, here's an example of how this analysis can detect an inconsistency. Suppose we had been given tank volume in cubic meters (m^3).
Now our units of measurement are:
t (seconds) = tank volume (m^3) / flow rate (gallons/sec)
seconds = m^3 * (seconds / gallon)
Clearly, the units don't match. We either have to convert volume in m^3 to volume in gallons, or vice versa. Then we might have
seconds = m^3 * (seconds / m^3)
Now we use algebra to show that this formula is self-consistent.
--> Note that you have to consider units of measurement rather than name of the quantity being measured. If we just used the quantity names we would have
time = volume * (time / volume)
which would appear correct but would be wrong if volume was measured in m^3 and flow rate was measured in gallons/second.
For a more technical discussion of units of measurement, see the reference below, in the section "Units".
Dimensional Analysis is not really for calculating but instead for analysing the relationships between different ways of measurement. It is used to convert and change from one unit to another.