A boiler having a gas sensing and an earthquake sensing function, the boiler comprising: a boiler body receiving a fuel and generating flame; a fuel cut-off unit receiving a cut-off signal to cause fuel supply to the boiler body to be cut off; and a gas sensor provided in the boiler body to sense gas and generate a gas sensing signal; an earthquake sensor provided in the boiler body to sense an earthquake and generate an earthquake sensing signal; a gas concentration determiner receiving the gas sensing signal from the gas sensor to determine a gas concentration; an earthquake sensitivity determiner receiving the earthquake sensing signal from the earthquake sensor to determine an earthquake sensitivity; and a controller configured to transmit the cut-off signal to the fuel cut-off unit according to the gas concentration determined by the gas concentration determiner, or transmit the cut-off signal to the fuel cut-off unit according to the earthquake sensitivity determined by the earthquake sensitivity determiner; wherein the boiler further comprises: an input unit configured to input a sampling period into the controller, in which the controller is configured to set an allowable gas concentration range by accumulating the gas concentration determined by the gas concentration determiner during the sampling period input by the input unit, and is configured to transmit the cut-off signal to the fuel cut-off unit when the gas concentration determined by the gas concentration determiner is out of the allowable gas concentration range after the sampling period, or an input unit configured to input a sampling period into the controller, in which the controller is configured to set an allowable earthquake sensitivity range by accumulating the earthquake sensitivity determined by the earthquake sensitivity determiner during the sampling period input by the input unit, and is configured to transmit the cut-off signal to the fuel cut-off unit when the earthquake sensitivity determined by the earthquake sensitivity determiner is out of the allowable earthquake sensitivity range after the sampling period. a boiler body receiving a fuel and generating flame; a fuel cut-off unit receiving a cut-off signal to cause fuel supply to the boiler body to be cut off; and a gas sensor provided in the boiler body to sense gas and generate a gas sensing signal; an earthquake sensor provided in the boiler body to sense an earthquake and generate an earthquake sensing signal; a gas concentration determiner receiving the gas sensing signal from the gas sensor to determine a gas concentration; an earthquake sensitivity determiner receiving the earthquake sensing signal from the earthquake sensor to determine an earthquake sensitivity; and a controller configured to transmit the cut-off signal to the fuel cut-off unit according to the gas concentration determined by the gas concentration determiner, or transmit the cut-off signal to the fuel cut-off unit according to the earthquake sensitivity determined by the earthquake sensitivity determiner; wherein the boiler further comprises: an input unit configured to input a sampling period into the controller, in which the controller is configured to set an allowable gas concentration range by accumulating the gas concentration determined by the gas concentration determiner during the sampling period input by the input unit, and is configured to transmit the cut-off signal to the fuel cut-off unit when the gas concentration determined by the gas concentration determiner is out of the allowable gas concentration range after the sampling period, or an input unit configured to input a sampling period into the controller, in which the controller is configured to set an allowable earthquake sensitivity range by accumulating the earthquake sensitivity determined by the earthquake sensitivity determiner during the sampling period input by the input unit, and is configured to transmit the cut-off signal to the fuel cut-off unit when the earthquake sensitivity determined by the earthquake sensitivity determiner is out of the allowable earthquake sensitivity range after the sampling period. an input unit configured to input a sampling period into the controller, in which the controller is configured to set an allowable gas concentration range by accumulating the gas concentration determined by the gas concentration determiner during the sampling period input by the input unit, and is configured to transmit the cut-off signal to the fuel cut-off unit when the gas concentration determined by the gas concentration determiner is out of the allowable gas concentration range after the sampling period, or an input unit configured to input a sampling period into the controller, in which the controller is configured to set an allowable earthquake sensitivity range by accumulating the earthquake sensitivity determined by the earthquake sensitivity determiner during the sampling period input by the input unit, and is configured to transmit the cut-off signal to the fuel cut-off unit when the earthquake sensitivity determined by the earthquake sensitivity determiner is out of the allowable earthquake sensitivity range after the sampling period.