Of the three states of matter, gases undergo the greatest volume changes with changing temperature and pressure conditions, but liquids also undergo changes. Liquids aren't responsive to pressure changes, but they can be responsive to temperature changes, depending on their composition. To calculate the volume change of a liquid with respect to temperature, you need to know its coefficient of volumetric expansion. Gases, on the other hand, all expand and contract more or less in accordance with the ideal gas law, and the volume change is not dependent on its composition.
TL;DR (Too Long; Didn't Read)
Calculate volume change of a liquid with changing temperature by looking up its coefficient of expansion (β) and using the equation. Both the temperature and pressure of a gas are dependent on temperature, so to calculate volume change, use the ideal gas law.
Volume Changes for Liquids
When you add heat to a liquid, you increase the kinetic and vibrational energy of the particles comprising it. As a result, they increase their range of motion within the limits of the forces holding them together as a liquid. These forces depend on the strength of the bonds holding molecules together and binding molecules to each other, and are different for every liquid. The coefficient of volumetric expansion -- usually denoted by the lowercase Greek letter beta (β) -- is a measure of the amount a particular liquid expands per degree of temperature change. You can look up this quantity for any particular liquid in a table.
Once you know the coefficient of expansion (β) for the liquid in question, calculate the change in volume by using the formula:
where ∆V is the change in temperature, V0 and T0 are the initial volume and temperature and T1 is the new temperature.
Volume Changes for Gases
Particles in a gas have more freedom of movement than they do in a liquid. According to the ideal gas law, the pressure (P) and volume (V) of a gas are mutually dependent on temperature (T) and the number of moles of gas present (n). The ideal gas equation is:
where R is a constant known as the ideal gas constant. In SI (metric) units, the value of this constant is 8.314 joules per mole Kelvin.
Pressure is constant: Rearranging this equation to isolate volume, you get:
and if you keep the pressure and number of moles constant, you have a direct relationship between volume and temperature:
where ∆V is change in volume and ∆T is change in temperature. If you start from an initial temperature T0 and pressure V0 and want to know the volume at a new temperature T1 the equation becomes:
Temperature is constant: If you keep the temperature constant and allow pressure to change, this equation gives you a direct relationship between volume and pressure:
Notice that the volume is larger if T1 is larger than T0 but smaller if P1 is larger than P0.
Pressure and temperature both vary: When both temperature and pressure vary, the the equation becomes:
Plug in the values for initial and final temperature and pressure and the value for initial volume to find the new volume.