The installation costs of tankless water heaters are from 2 - 4 times higher than tank-type water heaters. For gas tankless hot water heaters, the same gas supply line and/or venting may need to be sized larger than for a typical gas tank. Electric tankless water heaters draw more power and will require multiple circuits and/or heavier cable, which will increase installation costs. Water connections for both are comparable or identical to those used on tank-type water heaters. In some cases, the temperature and pressure (T&P) valve necessary for tank systems may not be required for a tankless heater. (Check with your local code official)
Gas and electric whole-house tankless water heaters are more expensive than typical tank systems except when comparing to high efficiency tank systems. In these cases, the high efficiency tanks may be close in cost to the tankless systems.