A touch panel device comprising: a touch panel that detects a touch input, the touch panel including a plurality of electrodes arrayed in X and Y directions; and circuitry configured to calculate a first width corresponding to an object approaching the touch panel based on an output distribution of capacitance values from the touch panel; determine whether an input operation corresponding to the object is valid based on the calculated first width of the object; calculate, as the first width corresponding to the object, the length of the object approaching an edge of the touch panel the length being in a direction substantially parallel to the edge of the touch panel; calculate, as a second width corresponding to the object, the length of the object crossing over the edge of the touch panel the length being in a direction substantially parallel to the edge of the touch panel and the calculation being based on an output distribution of capacitance values from the touch panel; compare the first width with the second width; and determine whether the input operation corresponding to the object is valid based on the comparison between the first and second widths. a touch panel that detects a touch input, the touch panel including a plurality of electrodes arrayed in X and Y directions; and circuitry configured to calculate a first width corresponding to an object approaching the touch panel based on an output distribution of capacitance values from the touch panel; determine whether an input operation corresponding to the object is valid based on the calculated first width of the object; calculate, as the first width corresponding to the object, the length of the object approaching an edge of the touch panel the length being in a direction substantially parallel to the edge of the touch panel; calculate, as a second width corresponding to the object, the length of the object crossing over the edge of the touch panel the length being in a direction substantially parallel to the edge of the touch panel and the calculation being based on an output distribution of capacitance values from the touch panel; compare the first width with the second width; and determine whether the input operation corresponding to the object is valid based on the comparison between the first and second widths. calculate a first width corresponding to an object approaching the touch panel based on an output distribution of capacitance values from the touch panel; determine whether an input operation corresponding to the object is valid based on the calculated first width of the object; calculate, as the first width corresponding to the object, the length of the object approaching an edge of the touch panel the length being in a direction substantially parallel to the edge of the touch panel; calculate, as a second width corresponding to the object, the length of the object crossing over the edge of the touch panel the length being in a direction substantially parallel to the edge of the touch panel and the calculation being based on an output distribution of capacitance values from the touch panel; compare the first width with the second width; and determine whether the input operation corresponding to the object is valid based on the comparison between the first and second widths.