Mapping neuronal activation using calcium imaging in vivo during behavioural tasks has advanced our understanding of nervous system function. In almost all of these studies, calcium imaging is used to infer spike probabilities because action potentials activate voltage-gated calcium channels and increase intracellular calcium levels. However, neurons not only fire action potentials, but also convey information via intrinsic dynamics such as by generating bistable membrane potential states. Although a number of tools for spike inference have been developed and are currently being used, no tool exists for converting calcium imaging signals to maps of cellular state in bistable neurons. Purkinje neurons in the larval zebrafish cerebellum exhibit membrane potential bistability, firing either tonically or in bursts. Several studies have implicated the role of a population code in cerebellar function, with bistability adding an extra layer of complexity to this code. In the present study, we develop a tool, CaMLSort, which uses convolutional recurrent neural networks to classify calcium imaging traces as arising from either tonic or bursting cells. We validate this classifier using a number of different methods and find that it performs well on simulated event rasters as well as real biological data that it had not previously seen. Moreover, we find that CaMLsort generalizes to other bistable neurons, such as dopaminergic neurons in the ventral tegmental area of mice. Thus, this tool offers a new way of analysing calcium imaging data from bistable neurons to understand how they participate in network computation and natural behaviours. KEY POINTS: Calcium imaging, compriising the gold standard of inferring neuronal activity, does not report cellular state in neurons that are bistable, such as Purkinje neurons in the cerebellum of larval zebrafish. We model the relationship between Purkinje neuron electrical activity and its corresponding calcium signal to compile a dataset of state-labelled simulated calcium signals. We apply machine-learning methods to this dataset to develop a tool that can classify the state of a Purkinje neuron using only its calcium signal, which works well on real data even though it was trained only on simulated data. CaMLsort (Calcium imaging and Machine Learning based tool to sort intracellular state) also generalizes well to bistable neurons in a different brain region (ventral tegmental area) in a different model organism (mouse). This tool can facilitate our understanding of how these neurons carry out their functions in a circuit.